Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
bf9dc5b3
Commit
bf9dc5b3
authored
Mar 11, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 11, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Detach more document objects in detach_inner_window.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
eca21a38
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
20 deletions
+27
-20
htmldoc.c
dlls/mshtml/htmldoc.c
+23
-15
htmlwindow.c
dlls/mshtml/htmlwindow.c
+3
-5
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-0
No files found.
dlls/mshtml/htmldoc.c
View file @
bf9dc5b3
...
...
@@ -4885,31 +4885,39 @@ static HRESULT HTMLDocumentNode_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
return
S_OK
;
}
static
void
HTMLDocumentNode_destructor
(
HTMLDOMNode
*
iface
)
void
detach_document_node
(
HTMLDocumentNode
*
doc
)
{
HTMLDocumentNode
*
This
=
impl_from_HTMLDOMNode
(
iface
);
unsigned
i
;
for
(
i
=
0
;
i
<
This
->
elem_vars_cnt
;
i
++
)
heap_free
(
This
->
elem_vars
[
i
]);
heap_free
(
This
->
elem_vars
);
while
(
!
list_empty
(
&
doc
->
plugin_hosts
))
detach_plugin_host
(
LIST_ENTRY
(
list_head
(
&
doc
->
plugin_hosts
),
PluginHost
,
entry
));
detach_events
(
This
);
if
(
This
->
catmgr
)
ICatInformation_Release
(
This
->
catmgr
);
detach_events
(
doc
);
detach_selection
(
doc
);
detach_ranges
(
doc
);
detach_selection
(
This
);
detach_ranges
(
This
);
for
(
i
=
0
;
i
<
doc
->
elem_vars_cnt
;
i
++
)
heap_free
(
doc
->
elem_vars
[
i
]);
heap_free
(
doc
->
elem_vars
);
doc
->
elem_vars_cnt
=
0
;
while
(
!
list_empty
(
&
This
->
plugin_hosts
))
detach_plugin_host
(
LIST_ENTRY
(
list_head
(
&
This
->
plugin_hosts
),
PluginHost
,
entry
));
if
(
doc
->
catmgr
)
{
ICatInformation_Release
(
doc
->
catmgr
);
doc
->
catmgr
=
NULL
;
}
if
(
!
This
->
nsdoc
&&
This
->
window
)
{
if
(
!
doc
->
nsdoc
&&
doc
->
window
)
{
/* document fragments own reference to inner window */
IHTMLWindow2_Release
(
&
This
->
window
->
base
.
IHTMLWindow2_iface
);
This
->
window
=
NULL
;
IHTMLWindow2_Release
(
&
doc
->
window
->
base
.
IHTMLWindow2_iface
);
doc
->
window
=
NULL
;
}
}
static
void
HTMLDocumentNode_destructor
(
HTMLDOMNode
*
iface
)
{
HTMLDocumentNode
*
This
=
impl_from_HTMLDOMNode
(
iface
);
detach_document_node
(
This
);
heap_free
(
This
->
event_vector
);
ConnectionPointContainer_Destroy
(
&
This
->
basedoc
.
cp_container
);
}
...
...
dlls/mshtml/htmlwindow.c
View file @
bf9dc5b3
...
...
@@ -126,15 +126,13 @@ static inline HRESULT get_window_event(HTMLWindow *window, eventid_t eid, VARIAN
static
void
detach_inner_window
(
HTMLInnerWindow
*
window
)
{
HTMLOuterWindow
*
outer_window
=
window
->
base
.
outer_window
;
HTMLDocumentNode
*
doc
=
window
->
doc
;
if
(
outer_window
&&
outer_window
->
doc_obj
&&
outer_window
==
outer_window
->
doc_obj
->
basedoc
.
window
)
window
->
doc
->
basedoc
.
cp_container
.
forward_container
=
NULL
;
if
(
window
->
doc
)
{
detach_events
(
window
->
doc
);
while
(
!
list_empty
(
&
window
->
doc
->
plugin_hosts
))
detach_plugin_host
(
LIST_ENTRY
(
list_head
(
&
window
->
doc
->
plugin_hosts
),
PluginHost
,
entry
));
}
if
(
doc
)
detach_document_node
(
doc
);
abort_window_bindings
(
window
);
remove_target_tasks
(
window
->
task_magic
);
...
...
dlls/mshtml/mshtml_private.h
View file @
bf9dc5b3
...
...
@@ -975,6 +975,7 @@ HRESULT HTMLTxtRange_Create(HTMLDocumentNode*,nsIDOMRange*,IHTMLTxtRange**) DECL
IHTMLStyleSheet
*
HTMLStyleSheet_Create
(
nsIDOMStyleSheet
*
)
DECLSPEC_HIDDEN
;
IHTMLStyleSheetsCollection
*
HTMLStyleSheetsCollection_Create
(
nsIDOMStyleSheetList
*
)
DECLSPEC_HIDDEN
;
void
detach_document_node
(
HTMLDocumentNode
*
)
DECLSPEC_HIDDEN
;
void
detach_selection
(
HTMLDocumentNode
*
)
DECLSPEC_HIDDEN
;
void
detach_ranges
(
HTMLDocumentNode
*
)
DECLSPEC_HIDDEN
;
HRESULT
get_node_text
(
HTMLDOMNode
*
,
BSTR
*
)
DECLSPEC_HIDDEN
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment