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
50303274
Commit
50303274
authored
May 15, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
May 15, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Keep reference to document node in onload event handler.
parent
3a1ce6a8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
nsevents.c
dlls/mshtml/nsevents.c
+13
-9
No files found.
dlls/mshtml/nsevents.c
View file @
50303274
...
...
@@ -235,6 +235,7 @@ static nsresult NSAPI handle_load(nsIDOMEventListener *iface, nsIDOMEvent *event
HTMLDocumentNode
*
doc
=
This
->
This
->
doc
;
nsIDOMHTMLElement
*
nsbody
=
NULL
;
HTMLDocumentObj
*
doc_obj
=
NULL
;
nsresult
nsres
=
NS_OK
;
TRACE
(
"(%p)
\n
"
,
doc
);
...
...
@@ -245,6 +246,8 @@ static nsresult NSAPI handle_load(nsIDOMEventListener *iface, nsIDOMEvent *event
connect_scripts
(
doc
->
window
);
htmldoc_addref
(
&
doc
->
basedoc
);
if
(
doc_obj
)
handle_docobj_load
(
doc_obj
);
...
...
@@ -264,18 +267,19 @@ static nsresult NSAPI handle_load(nsIDOMEventListener *iface, nsIDOMEvent *event
IDocObjectService_FireDocumentComplete
(
doc_obj
->
doc_object_service
,
&
doc
->
basedoc
.
window
->
base
.
IHTMLWindow2_iface
,
0
);
if
(
!
doc
->
nsdoc
)
{
if
(
doc
->
nsdoc
)
{
nsIDOMHTMLDocument_GetBody
(
doc
->
nsdoc
,
&
nsbody
);
if
(
nsbody
)
{
fire_event
(
doc
,
EVENTID_LOAD
,
TRUE
,
(
nsIDOMNode
*
)
nsbody
,
event
,
(
IDispatch
*
)
&
doc
->
window
->
base
.
IDispatchEx_iface
);
nsIDOMHTMLElement_Release
(
nsbody
);
}
}
else
{
ERR
(
"NULL nsdoc
\n
"
);
return
NS_ERROR_FAILURE
;
nsres
=
NS_ERROR_FAILURE
;
}
nsIDOMHTMLDocument_GetBody
(
doc
->
nsdoc
,
&
nsbody
);
if
(
nsbody
)
{
fire_event
(
doc
,
EVENTID_LOAD
,
TRUE
,
(
nsIDOMNode
*
)
nsbody
,
event
,
(
IDispatch
*
)
&
doc
->
window
->
base
.
IDispatchEx_iface
);
nsIDOMHTMLElement_Release
(
nsbody
);
}
return
NS_OK
;
htmldoc_release
(
&
doc
->
basedoc
);
return
nsres
;
}
static
nsresult
NSAPI
handle_htmlevent
(
nsIDOMEventListener
*
iface
,
nsIDOMEvent
*
event
)
...
...
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