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
bc02ba80
Commit
bc02ba80
authored
Feb 13, 2017
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 14, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Pass event target as EventTarget to release_event_target.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
57239e78
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
13 deletions
+16
-13
htmlevent.c
dlls/mshtml/htmlevent.c
+13
-8
htmlevent.h
dlls/mshtml/htmlevent.h
+1
-1
htmlnode.c
dlls/mshtml/htmlnode.c
+1
-2
htmlwindow.c
dlls/mshtml/htmlwindow.c
+1
-2
No files found.
dlls/mshtml/htmlevent.c
View file @
bc02ba80
...
...
@@ -1642,20 +1642,25 @@ HRESULT doc_init_events(HTMLDocumentNode *doc)
return
S_OK
;
}
void
release_event_target
(
event_target_
t
*
event_target
)
void
release_event_target
(
EventTarge
t
*
event_target
)
{
int
i
;
unsigned
int
j
;
if
(
!
event_target
->
ptr
)
return
;
for
(
i
=
0
;
i
<
EVENTID_LAST
;
i
++
)
{
if
(
event_target
->
event_table
[
i
])
{
if
(
event_target
->
event_table
[
i
]
->
handler_prop
)
IDispatch_Release
(
event_target
->
event_table
[
i
]
->
handler_prop
);
for
(
j
=
0
;
j
<
event_target
->
event_table
[
i
]
->
handler_cnt
;
j
++
)
if
(
event_target
->
event_table
[
i
]
->
handlers
[
j
])
IDispatch_Release
(
event_target
->
event_table
[
i
]
->
handlers
[
j
]);
if
(
event_target
->
ptr
->
event_table
[
i
])
{
if
(
event_target
->
ptr
->
event_table
[
i
]
->
handler_prop
)
IDispatch_Release
(
event_target
->
ptr
->
event_table
[
i
]
->
handler_prop
);
for
(
j
=
0
;
j
<
event_target
->
ptr
->
event_table
[
i
]
->
handler_cnt
;
j
++
)
if
(
event_target
->
ptr
->
event_table
[
i
]
->
handlers
[
j
])
IDispatch_Release
(
event_target
->
ptr
->
event_table
[
i
]
->
handlers
[
j
]);
heap_free
(
event_target
->
ptr
->
event_table
[
i
]
->
handlers
);
heap_free
(
event_target
->
ptr
->
event_table
[
i
]);
}
}
heap_free
(
event_target
);
heap_free
(
event_target
->
ptr
);
}
dlls/mshtml/htmlevent.h
View file @
bc02ba80
...
...
@@ -55,7 +55,7 @@ typedef enum {
eventid_t
str_to_eid
(
LPCWSTR
)
DECLSPEC_HIDDEN
;
void
check_event_attr
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
)
DECLSPEC_HIDDEN
;
void
release_event_target
(
event_target_
t
*
)
DECLSPEC_HIDDEN
;
void
release_event_target
(
EventTarge
t
*
)
DECLSPEC_HIDDEN
;
void
fire_event
(
HTMLDocumentNode
*
,
eventid_t
,
BOOL
,
HTMLDOMNode
*
,
nsIDOMEvent
*
,
IDispatch
*
)
DECLSPEC_HIDDEN
;
HRESULT
set_event_handler
(
EventTarget
*
,
eventid_t
,
VARIANT
*
)
DECLSPEC_HIDDEN
;
HRESULT
get_event_handler
(
EventTarget
*
,
eventid_t
,
VARIANT
*
)
DECLSPEC_HIDDEN
;
...
...
dlls/mshtml/htmlnode.c
View file @
bc02ba80
...
...
@@ -1185,12 +1185,11 @@ HRESULT HTMLDOMNode_QI(HTMLDOMNode *This, REFIID riid, void **ppv)
void
HTMLDOMNode_destructor
(
HTMLDOMNode
*
This
)
{
release_event_target
(
&
This
->
event_target
);
if
(
This
->
nsnode
)
nsIDOMNode_Release
(
This
->
nsnode
);
if
(
This
->
doc
&&
&
This
->
doc
->
node
!=
This
)
htmldoc_release
(
&
This
->
doc
->
basedoc
);
if
(
This
->
event_target
.
ptr
)
release_event_target
(
This
->
event_target
.
ptr
);
}
static
HRESULT
HTMLDOMNode_clone
(
HTMLDOMNode
*
This
,
nsIDOMNode
*
nsnode
,
HTMLDOMNode
**
ret
)
...
...
dlls/mshtml/htmlwindow.c
View file @
bc02ba80
...
...
@@ -253,8 +253,7 @@ static void release_inner_window(HTMLInnerWindow *This)
htmldoc_release
(
&
This
->
doc
->
basedoc
);
}
if
(
This
->
event_target
.
ptr
)
release_event_target
(
This
->
event_target
.
ptr
);
release_event_target
(
&
This
->
event_target
);
release_dispex
(
&
This
->
event_target
.
dispex
);
for
(
i
=
0
;
i
<
This
->
global_prop_cnt
;
i
++
)
...
...
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