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
392a15cd
Commit
392a15cd
authored
Aug 03, 2023
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Aug 04, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Unlink variants using a helper function.
And move the clear to the destructor. Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
ff5db66c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
4 deletions
+26
-4
dispex.c
dlls/mshtml/dispex.c
+1
-1
htmlevent.c
dlls/mshtml/htmlevent.c
+16
-2
htmlwindow.c
dlls/mshtml/htmlwindow.c
+3
-1
mshtml_private.h
dlls/mshtml/mshtml_private.h
+6
-0
No files found.
dlls/mshtml/dispex.c
View file @
392a15cd
...
...
@@ -2030,8 +2030,8 @@ void dispex_unlink(DispatchEx *This)
return
;
for
(
prop
=
This
->
dynamic_data
->
props
;
prop
<
This
->
dynamic_data
->
props
+
This
->
dynamic_data
->
prop_cnt
;
prop
++
)
{
VariantClear
(
&
prop
->
var
);
prop
->
flags
|=
DYNPROP_DELETED
;
unlink_variant
(
&
prop
->
var
);
}
if
(
This
->
dynamic_data
->
func_disps
)
{
...
...
dlls/mshtml/htmlevent.c
View file @
392a15cd
...
...
@@ -2462,7 +2462,14 @@ static void DOMCustomEvent_unlink(DispatchEx *dispex)
{
DOMCustomEvent
*
custom_event
=
DOMCustomEvent_from_DOMEvent
(
DOMEvent_from_DispatchEx
(
dispex
));
DOMEvent_unlink
(
&
custom_event
->
event
.
dispex
);
unlink_variant
(
&
custom_event
->
detail
);
}
static
void
DOMCustomEvent_destructor
(
DispatchEx
*
dispex
)
{
DOMCustomEvent
*
custom_event
=
DOMCustomEvent_from_DOMEvent
(
DOMEvent_from_DispatchEx
(
dispex
));
VariantClear
(
&
custom_event
->
detail
);
DOMEvent_destructor
(
dispex
);
}
typedef
struct
{
...
...
@@ -2607,7 +2614,14 @@ static void DOMMessageEvent_unlink(DispatchEx *dispex)
{
DOMMessageEvent
*
message_event
=
DOMMessageEvent_from_DOMEvent
(
DOMEvent_from_DispatchEx
(
dispex
));
DOMEvent_unlink
(
&
message_event
->
event
.
dispex
);
unlink_variant
(
&
message_event
->
data
);
}
static
void
DOMMessageEvent_destructor
(
DispatchEx
*
dispex
)
{
DOMMessageEvent
*
message_event
=
DOMMessageEvent_from_DOMEvent
(
DOMEvent_from_DispatchEx
(
dispex
));
VariantClear
(
&
message_event
->
data
);
DOMEvent_destructor
(
dispex
);
}
static
void
DOMMessageEvent_init_dispex_info
(
dispex_data_t
*
info
,
compat_mode_t
compat_mode
)
...
...
@@ -3038,7 +3052,7 @@ static dispex_static_data_t DOMPageTransitionEvent_dispex = {
};
static
const
dispex_static_data_vtbl_t
DOMCustomEvent_dispex_vtbl
=
{
DOMEvent_destructor
,
DOM
Custom
Event_destructor
,
DOMCustomEvent_unlink
};
...
...
@@ -3056,7 +3070,7 @@ static dispex_static_data_t DOMCustomEvent_dispex = {
};
static
const
dispex_static_data_vtbl_t
DOMMessageEvent_dispex_vtbl
=
{
DOMEvent_destructor
,
DOM
Message
Event_destructor
,
DOMMessageEvent_unlink
};
...
...
dlls/mshtml/htmlwindow.c
View file @
392a15cd
...
...
@@ -3777,7 +3777,7 @@ static void HTMLWindow_unlink(DispatchEx *dispex)
IHTMLStorage_Release
(
local_storage
);
}
IHTMLPerformanceTiming_Release
(
&
This
->
performance_timing
->
IHTMLPerformanceTiming_iface
);
VariantClear
(
&
This
->
performance
);
unlink_variant
(
&
This
->
performance
);
}
static
void
HTMLWindow_destructor
(
DispatchEx
*
dispex
)
...
...
@@ -3785,6 +3785,8 @@ static void HTMLWindow_destructor(DispatchEx *dispex)
HTMLInnerWindow
*
This
=
impl_from_DispatchEx
(
dispex
);
unsigned
i
;
VariantClear
(
&
This
->
performance
);
for
(
i
=
0
;
i
<
This
->
global_prop_cnt
;
i
++
)
free
(
This
->
global_props
[
i
].
name
);
free
(
This
->
global_props
);
...
...
dlls/mshtml/mshtml_private.h
View file @
392a15cd
...
...
@@ -1497,6 +1497,12 @@ static inline void unlink_ref(void *p)
}
}
static
inline
void
unlink_variant
(
VARIANT
*
v
)
{
if
(
V_VT
(
v
)
==
VT_DISPATCH
||
V_VT
(
v
)
==
VT_UNKNOWN
)
unlink_ref
(
&
V_UNKNOWN
(
v
));
}
#ifdef __i386__
extern
void
*
call_thiscall_func
;
#endif
...
...
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