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
5e581621
Commit
5e581621
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: Store weak GeckoBrowser reference in HTMLDocumentNode.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0ebbcedd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
0 deletions
+22
-0
htmldoc.c
dlls/mshtml/htmldoc.c
+8
-0
mshtml_private.h
dlls/mshtml/mshtml_private.h
+5
-0
nsembed.c
dlls/mshtml/nsembed.c
+9
-0
No files found.
dlls/mshtml/htmldoc.c
View file @
5e581621
...
...
@@ -4911,6 +4911,11 @@ void detach_document_node(HTMLDocumentNode *doc)
IHTMLWindow2_Release
(
&
doc
->
window
->
base
.
IHTMLWindow2_iface
);
doc
->
window
=
NULL
;
}
if
(
doc
->
browser
)
{
list_remove
(
&
doc
->
browser_entry
);
doc
->
browser
=
NULL
;
}
}
static
void
HTMLDocumentNode_destructor
(
HTMLDOMNode
*
iface
)
...
...
@@ -5194,6 +5199,9 @@ HRESULT create_document_node(nsIDOMHTMLDocument *nsdoc, GeckoBrowser *browser, H
doc
->
node
.
vtbl
=
&
HTMLDocumentNodeImplVtbl
;
list_add_head
(
&
browser
->
document_nodes
,
&
doc
->
browser_entry
);
doc
->
browser
=
browser
;
*
ret
=
doc
;
return
S_OK
;
}
...
...
dlls/mshtml/mshtml_private.h
View file @
5e581621
...
...
@@ -722,6 +722,8 @@ struct GeckoBrowser {
nsIURIContentListener
*
content_listener
;
HWND
hwnd
;
struct
list
document_nodes
;
};
typedef
struct
{
...
...
@@ -830,6 +832,9 @@ struct HTMLDocumentNode {
HTMLInnerWindow
*
window
;
GeckoBrowser
*
browser
;
struct
list
browser_entry
;
compat_mode_t
document_mode
;
BOOL
document_mode_locked
;
...
...
dlls/mshtml/nsembed.c
View file @
5e581621
...
...
@@ -1359,6 +1359,8 @@ static nsrefcnt NSAPI nsWebBrowserChrome_Release(nsIWebBrowserChrome *iface)
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
if
(
This
->
doc
)
detach_gecko_browser
(
This
);
if
(
This
->
weak_reference
)
{
This
->
weak_reference
->
browser
=
NULL
;
nsIWeakReference_Release
(
&
This
->
weak_reference
->
nsIWeakReference_iface
);
...
...
@@ -2155,6 +2157,7 @@ HRESULT create_gecko_browser(HTMLDocumentObj *doc, GeckoBrowser **_ret)
ret
->
doc
=
doc
;
ret
->
ref
=
1
;
list_init
(
&
ret
->
document_nodes
);
hres
=
init_browser
(
ret
);
if
(
SUCCEEDED
(
hres
))
...
...
@@ -2170,6 +2173,12 @@ void detach_gecko_browser(GeckoBrowser *This)
This
->
doc
=
NULL
;
while
(
!
list_empty
(
&
This
->
document_nodes
))
{
HTMLDocumentNode
*
doc
=
LIST_ENTRY
(
list_head
(
&
This
->
document_nodes
),
HTMLDocumentNode
,
browser_entry
);
list_remove
(
&
doc
->
browser_entry
);
doc
->
browser
=
NULL
;
}
ShowWindow
(
This
->
hwnd
,
SW_HIDE
);
SetParent
(
This
->
hwnd
,
NULL
);
...
...
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