Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
ce9ef35b
Commit
ce9ef35b
authored
Nov 01, 2023
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Nov 01, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Keep ref from the document node to the inner window.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
29d5ce6b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
8 deletions
+19
-8
htmldoc.c
dlls/mshtml/htmldoc.c
+19
-8
No files found.
dlls/mshtml/htmldoc.c
View file @
ce9ef35b
...
...
@@ -5700,6 +5700,12 @@ void detach_document_node(HTMLDocumentNode *doc)
{
unsigned
i
;
if
(
doc
->
window
)
{
HTMLInnerWindow
*
window
=
doc
->
window
;
doc
->
window
=
NULL
;
IHTMLWindow2_Release
(
&
window
->
base
.
IHTMLWindow2_iface
);
}
while
(
!
list_empty
(
&
doc
->
plugin_hosts
))
detach_plugin_host
(
LIST_ENTRY
(
list_head
(
&
doc
->
plugin_hosts
),
PluginHost
,
entry
));
...
...
@@ -5855,6 +5861,15 @@ static void *HTMLDocumentNode_query_interface(DispatchEx *dispex, REFIID riid)
return
HTMLDOMNode_query_interface
(
&
This
->
node
.
event_target
.
dispex
,
riid
);
}
static
void
HTMLDocumentNode_traverse
(
DispatchEx
*
dispex
,
nsCycleCollectionTraversalCallback
*
cb
)
{
HTMLDocumentNode
*
This
=
impl_from_DispatchEx
(
dispex
);
HTMLDOMNode_traverse
(
dispex
,
cb
);
if
(
This
->
window
)
note_cc_edge
((
nsISupports
*
)
&
This
->
window
->
base
.
IHTMLWindow2_iface
,
"window"
,
cb
);
}
static
void
HTMLDocumentNode_unlink
(
DispatchEx
*
dispex
)
{
HTMLDocumentNode
*
This
=
impl_from_DispatchEx
(
dispex
);
...
...
@@ -5865,13 +5880,8 @@ static void HTMLDocumentNode_unlink(DispatchEx *dispex)
detach_document_node
(
This
);
This
->
dom_document
=
NULL
;
This
->
html_document
=
NULL
;
This
->
window
=
NULL
;
}
else
if
(
This
->
window
)
{
detach_document_node
(
This
);
/* document fragments own reference to inner window */
IHTMLWindow2_Release
(
&
This
->
window
->
base
.
IHTMLWindow2_iface
);
This
->
window
=
NULL
;
}
}
...
...
@@ -6057,7 +6067,7 @@ static const event_target_vtbl_t HTMLDocumentNode_event_target_vtbl = {
{
.
query_interface
=
HTMLDocumentNode_query_interface
,
.
destructor
=
HTMLDocumentNode_destructor
,
.
traverse
=
HTMLD
OM
Node_traverse
,
.
traverse
=
HTMLD
ocument
Node_traverse
,
.
unlink
=
HTMLDocumentNode_unlink
,
.
get_name
=
HTMLDocumentNode_get_name
,
.
invoke
=
HTMLDocumentNode_invoke
,
...
...
@@ -6166,6 +6176,9 @@ static HTMLDocumentNode *alloc_doc_node(HTMLDocumentObj *doc_obj, HTMLInnerWindo
doc
->
outer_window
=
window
?
window
->
base
.
outer_window
:
NULL
;
doc
->
window
=
window
;
if
(
window
)
IHTMLWindow2_AddRef
(
&
window
->
base
.
IHTMLWindow2_iface
);
ConnectionPointContainer_Init
(
&
doc
->
cp_container
,
(
IUnknown
*
)
&
doc
->
IHTMLDocument2_iface
,
HTMLDocumentNode_cpc
);
HTMLDocumentNode_Persist_Init
(
doc
);
HTMLDocumentNode_Service_Init
(
doc
);
...
...
@@ -6241,8 +6254,6 @@ static HRESULT create_document_fragment(nsIDOMNode *nsnode, HTMLDocumentNode *do
if
(
!
doc_frag
)
return
E_OUTOFMEMORY
;
IHTMLWindow2_AddRef
(
&
doc_frag
->
window
->
base
.
IHTMLWindow2_iface
);
HTMLDOMNode_Init
(
doc_node
,
&
doc_frag
->
node
,
nsnode
,
&
HTMLDocumentNode_dispex
);
doc_frag
->
node
.
vtbl
=
&
HTMLDocumentFragmentImplVtbl
;
doc_frag
->
document_mode
=
lock_document_mode
(
doc_node
);
...
...
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