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
068f2440
Commit
068f2440
authored
Nov 30, 2023
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Dec 01, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Remove the inner window ref from the doc only when it is actually unlinked.
parent
1593f2f5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
htmldoc.c
dlls/mshtml/htmldoc.c
+7
-7
events.c
dlls/mshtml/tests/events.c
+7
-0
No files found.
dlls/mshtml/htmldoc.c
View file @
068f2440
...
@@ -5707,12 +5707,6 @@ void detach_document_node(HTMLDocumentNode *doc)
...
@@ -5707,12 +5707,6 @@ void detach_document_node(HTMLDocumentNode *doc)
{
{
unsigned
i
;
unsigned
i
;
if
(
doc
->
window
)
{
HTMLInnerWindow
*
window
=
doc
->
window
;
doc
->
window
=
NULL
;
IHTMLWindow2_Release
(
&
window
->
base
.
IHTMLWindow2_iface
);
}
while
(
!
list_empty
(
&
doc
->
plugin_hosts
))
while
(
!
list_empty
(
&
doc
->
plugin_hosts
))
detach_plugin_host
(
LIST_ENTRY
(
list_head
(
&
doc
->
plugin_hosts
),
PluginHost
,
entry
));
detach_plugin_host
(
LIST_ENTRY
(
list_head
(
&
doc
->
plugin_hosts
),
PluginHost
,
entry
));
...
@@ -5884,14 +5878,20 @@ static void HTMLDocumentNode_traverse(DispatchEx *dispex, nsCycleCollectionTrave
...
@@ -5884,14 +5878,20 @@ static void HTMLDocumentNode_traverse(DispatchEx *dispex, nsCycleCollectionTrave
static
void
HTMLDocumentNode_unlink
(
DispatchEx
*
dispex
)
static
void
HTMLDocumentNode_unlink
(
DispatchEx
*
dispex
)
{
{
HTMLDocumentNode
*
This
=
impl_from_DispatchEx
(
dispex
);
HTMLDocumentNode
*
This
=
impl_from_DispatchEx
(
dispex
);
HTMLInnerWindow
*
window
=
This
->
window
;
HTMLDOMNode_unlink
(
dispex
);
HTMLDOMNode_unlink
(
dispex
);
if
(
window
)
{
This
->
window
=
NULL
;
IHTMLWindow2_Release
(
&
window
->
base
.
IHTMLWindow2_iface
);
}
if
(
This
->
dom_document
)
{
if
(
This
->
dom_document
)
{
release_document_mutation
(
This
);
release_document_mutation
(
This
);
detach_document_node
(
This
);
detach_document_node
(
This
);
This
->
dom_document
=
NULL
;
This
->
dom_document
=
NULL
;
This
->
html_document
=
NULL
;
This
->
html_document
=
NULL
;
}
else
if
(
This
->
window
)
{
}
else
if
(
window
)
{
detach_document_node
(
This
);
detach_document_node
(
This
);
}
}
}
}
...
...
dlls/mshtml/tests/events.c
View file @
068f2440
...
@@ -3589,7 +3589,14 @@ static void test_doc_obj(IHTMLDocument2 *doc)
...
@@ -3589,7 +3589,14 @@ static void test_doc_obj(IHTMLDocument2 *doc)
ok
(
hres
==
S_OK
,
"get_document failed: %08lx
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"get_document failed: %08lx
\n
"
,
hres
);
ok
(
doc_node
!=
doc_node2
,
"doc_node == doc_node2
\n
"
);
ok
(
doc_node
!=
doc_node2
,
"doc_node == doc_node2
\n
"
);
IHTMLDocument2_Release
(
doc_node2
);
IHTMLDocument2_Release
(
doc_node2
);
hres
=
IHTMLDocument2_get_parentWindow
(
doc_node
,
&
window2
);
todo_wine
ok
(
hres
==
S_OK
,
"get_parentWindow failed: %08lx
\n
"
,
hres
);
todo_wine
ok
(
window
==
window2
,
"window != window2
\n
"
);
IHTMLDocument2_Release
(
doc_node
);
IHTMLDocument2_Release
(
doc_node
);
if
(
hres
==
S_OK
)
IHTMLWindow2_Release
(
window2
);
hres
=
IHTMLWindow2_get_location
(
window
,
&
location2
);
hres
=
IHTMLWindow2_get_location
(
window
,
&
location2
);
ok
(
hres
==
S_OK
,
"get_location failed: %08lx
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"get_location failed: %08lx
\n
"
,
hres
);
...
...
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