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
6a2ca11c
Commit
6a2ca11c
authored
Aug 01, 2023
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Aug 02, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use unlink and destructor in the vtbl for function disps.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
3c92edfd
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
54 additions
and
5 deletions
+54
-5
dispex.c
dlls/mshtml/dispex.c
+18
-5
htmldoc.c
dlls/mshtml/htmldoc.c
+2
-0
htmlelem.c
dlls/mshtml/htmlelem.c
+10
-0
htmlelemcol.c
dlls/mshtml/htmlelemcol.c
+2
-0
htmlimg.c
dlls/mshtml/htmlimg.c
+2
-0
htmlnode.c
dlls/mshtml/htmlnode.c
+2
-0
htmlselect.c
dlls/mshtml/htmlselect.c
+2
-0
htmlstorage.c
dlls/mshtml/htmlstorage.c
+2
-0
htmlstyle.c
dlls/mshtml/htmlstyle.c
+2
-0
htmlstylesheet.c
dlls/mshtml/htmlstylesheet.c
+4
-0
htmlwindow.c
dlls/mshtml/htmlwindow.c
+2
-0
mshtml_private.h
dlls/mshtml/mshtml_private.h
+4
-0
xmlhttprequest.c
dlls/mshtml/xmlhttprequest.c
+2
-0
No files found.
dlls/mshtml/dispex.c
View file @
6a2ca11c
...
...
@@ -826,11 +826,8 @@ static ULONG WINAPI Function_Release(IUnknown *iface)
TRACE
(
"(%p) ref=%ld
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
assert
(
!
This
->
obj
);
if
(
!
ref
)
release_dispex
(
&
This
->
dispex
);
free
(
This
);
}
return
ref
;
}
...
...
@@ -846,6 +843,13 @@ static inline func_disp_t *impl_from_DispatchEx(DispatchEx *iface)
return
CONTAINING_RECORD
(
iface
,
func_disp_t
,
dispex
);
}
static
void
function_destructor
(
DispatchEx
*
dispex
)
{
func_disp_t
*
This
=
impl_from_DispatchEx
(
dispex
);
assert
(
!
This
->
obj
);
free
(
This
);
}
static
HRESULT
function_value
(
DispatchEx
*
dispex
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
params
,
VARIANT
*
res
,
EXCEPINFO
*
ei
,
IServiceProvider
*
caller
)
{
...
...
@@ -902,6 +906,8 @@ static HRESULT function_value(DispatchEx *dispex, LCID lcid, WORD flags, DISPPAR
}
static
const
dispex_static_data_vtbl_t
function_dispex_vtbl
=
{
function_destructor
,
NULL
,
function_value
,
NULL
,
NULL
,
...
...
@@ -2053,8 +2059,11 @@ void release_dispex(DispatchEx *This)
{
dynamic_prop_t
*
prop
;
if
(
This
->
info
->
desc
->
vtbl
&&
This
->
info
->
desc
->
vtbl
->
unlink
)
This
->
info
->
desc
->
vtbl
->
unlink
(
This
);
if
(
!
This
->
dynamic_data
)
return
;
goto
destructor
;
for
(
prop
=
This
->
dynamic_data
->
props
;
prop
<
This
->
dynamic_data
->
props
+
This
->
dynamic_data
->
prop_cnt
;
prop
++
)
{
VariantClear
(
&
prop
->
var
);
...
...
@@ -2078,6 +2087,10 @@ void release_dispex(DispatchEx *This)
}
free
(
This
->
dynamic_data
);
destructor:
if
(
This
->
info
->
desc
->
vtbl
&&
This
->
info
->
desc
->
vtbl
->
destructor
)
This
->
info
->
desc
->
vtbl
->
destructor
(
This
);
}
void
init_dispatch
(
DispatchEx
*
dispex
,
IUnknown
*
outer
,
dispex_static_data_t
*
data
,
compat_mode_t
compat_mode
)
...
...
dlls/mshtml/htmldoc.c
View file @
6a2ca11c
...
...
@@ -6088,6 +6088,8 @@ static const event_target_vtbl_t HTMLDocumentNode_event_target_vtbl = {
{
NULL
,
NULL
,
NULL
,
NULL
,
HTMLDocumentNode_get_name
,
HTMLDocumentNode_invoke
,
NULL
,
...
...
dlls/mshtml/htmlelem.c
View file @
6a2ca11c
...
...
@@ -1270,6 +1270,8 @@ static HRESULT HTMLRectCollection_invoke(DispatchEx *dispex, DISPID id, LCID lci
static
const
dispex_static_data_vtbl_t
HTMLRectCollection_dispex_vtbl
=
{
NULL
,
NULL
,
NULL
,
HTMLRectCollection_get_dispid
,
HTMLRectCollection_get_name
,
HTMLRectCollection_invoke
,
...
...
@@ -7329,6 +7331,8 @@ static const tid_t HTMLElement_iface_tids[] = {
const
event_target_vtbl_t
HTMLElement_event_target_vtbl
=
{
{
NULL
,
NULL
,
NULL
,
HTMLElement_get_dispid
,
HTMLElement_get_name
,
HTMLElement_invoke
,
...
...
@@ -7795,6 +7799,8 @@ static HRESULT token_list_invoke(DispatchEx *dispex, DISPID id, LCID lcid, WORD
}
static
const
dispex_static_data_vtbl_t
token_list_dispex_vtbl
=
{
NULL
,
NULL
,
token_list_value
,
token_list_get_dispid
,
token_list_get_name
,
...
...
@@ -8212,6 +8218,8 @@ static HRESULT HTMLFiltersCollection_invoke(DispatchEx *dispex, DISPID id, LCID
static
const
dispex_static_data_vtbl_t
HTMLFiltersCollection_dispex_vtbl
=
{
NULL
,
NULL
,
NULL
,
HTMLFiltersCollection_get_dispid
,
HTMLFiltersCollection_get_name
,
HTMLFiltersCollection_invoke
,
...
...
@@ -8968,6 +8976,8 @@ static HRESULT HTMLAttributeCollection_invoke(DispatchEx *dispex, DISPID id, LCI
static
const
dispex_static_data_vtbl_t
HTMLAttributeCollection_dispex_vtbl
=
{
NULL
,
NULL
,
NULL
,
HTMLAttributeCollection_get_dispid
,
HTMLAttributeCollection_get_name
,
HTMLAttributeCollection_invoke
,
...
...
dlls/mshtml/htmlelemcol.c
View file @
6a2ca11c
...
...
@@ -623,6 +623,8 @@ static HRESULT HTMLElementCollection_invoke(DispatchEx *dispex, DISPID id, LCID
static
const
dispex_static_data_vtbl_t
HTMLElementColection_dispex_vtbl
=
{
NULL
,
NULL
,
NULL
,
HTMLElementCollection_get_dispid
,
HTMLElementCollection_get_name
,
HTMLElementCollection_invoke
,
...
...
dlls/mshtml/htmlimg.c
View file @
6a2ca11c
...
...
@@ -975,6 +975,8 @@ static const tid_t HTMLImageElementFactory_iface_tids[] = {
};
static
const
dispex_static_data_vtbl_t
HTMLImageElementFactory_dispex_vtbl
=
{
NULL
,
NULL
,
HTMLImageElementFactory_value
,
NULL
,
NULL
,
...
...
dlls/mshtml/htmlnode.c
View file @
6a2ca11c
...
...
@@ -434,6 +434,8 @@ static HRESULT HTMLDOMChildrenCollection_invoke(DispatchEx *dispex, DISPID id, L
static
const
dispex_static_data_vtbl_t
HTMLDOMChildrenCollection_dispex_vtbl
=
{
NULL
,
NULL
,
NULL
,
HTMLDOMChildrenCollection_get_dispid
,
HTMLDOMChildrenCollection_get_name
,
HTMLDOMChildrenCollection_invoke
,
...
...
dlls/mshtml/htmlselect.c
View file @
6a2ca11c
...
...
@@ -629,6 +629,8 @@ static const tid_t HTMLOptionElementFactory_iface_tids[] = {
};
static
const
dispex_static_data_vtbl_t
HTMLOptionElementFactory_dispex_vtbl
=
{
NULL
,
NULL
,
HTMLOptionElementFactory_value
,
NULL
,
NULL
,
...
...
dlls/mshtml/htmlstorage.c
View file @
6a2ca11c
...
...
@@ -1309,6 +1309,8 @@ static HRESULT HTMLStorage_next_dispid(DispatchEx *dispex, DISPID id, DISPID *pi
static
const
dispex_static_data_vtbl_t
HTMLStorage_dispex_vtbl
=
{
NULL
,
NULL
,
NULL
,
HTMLStorage_get_dispid
,
HTMLStorage_get_name
,
HTMLStorage_invoke
,
...
...
dlls/mshtml/htmlstyle.c
View file @
6a2ca11c
...
...
@@ -9998,6 +9998,8 @@ void CSSStyle_init_dispex_info(dispex_data_t *info, compat_mode_t mode)
const
dispex_static_data_vtbl_t
CSSStyle_dispex_vtbl
=
{
NULL
,
NULL
,
NULL
,
CSSStyle_get_dispid
,
NULL
,
NULL
...
...
dlls/mshtml/htmlstylesheet.c
View file @
6a2ca11c
...
...
@@ -467,6 +467,8 @@ static HRESULT HTMLStyleSheetRulesCollection_invoke(DispatchEx *dispex, DISPID i
static
const
dispex_static_data_vtbl_t
HTMLStyleSheetRulesCollection_dispex_vtbl
=
{
NULL
,
NULL
,
NULL
,
HTMLStyleSheetRulesCollection_get_dispid
,
HTMLStyleSheetRulesCollection_get_name
,
HTMLStyleSheetRulesCollection_invoke
...
...
@@ -894,6 +896,8 @@ static HRESULT HTMLStyleSheetsCollection_invoke(DispatchEx *dispex, DISPID id, L
static
const
dispex_static_data_vtbl_t
HTMLStyleSheetsCollection_dispex_vtbl
=
{
NULL
,
NULL
,
NULL
,
HTMLStyleSheetsCollection_get_dispid
,
HTMLStyleSheetsCollection_get_name
,
HTMLStyleSheetsCollection_invoke
...
...
dlls/mshtml/htmlwindow.c
View file @
6a2ca11c
...
...
@@ -4030,6 +4030,8 @@ static const event_target_vtbl_t HTMLWindow_event_target_vtbl = {
{
NULL
,
NULL
,
NULL
,
NULL
,
HTMLWindow_get_name
,
HTMLWindow_invoke
,
NULL
,
...
...
dlls/mshtml/mshtml_private.h
View file @
6a2ca11c
...
...
@@ -347,6 +347,10 @@ typedef struct DispatchEx DispatchEx;
- dynamic props: These props are generally allocated by external code (e.g. 'document.wine = 42' creates 'wine' dynamic prop on document)
*/
typedef
struct
{
/* Unlike delete_cycle_collectable, unlink is called before the destructor (if available). */
void
(
*
destructor
)(
DispatchEx
*
);
void
(
*
unlink
)(
DispatchEx
*
);
/* Called when the object wants to handle DISPID_VALUE invocations */
HRESULT
(
*
value
)(
DispatchEx
*
,
LCID
,
WORD
,
DISPPARAMS
*
,
VARIANT
*
,
EXCEPINFO
*
,
IServiceProvider
*
);
...
...
dlls/mshtml/xmlhttprequest.c
View file @
6a2ca11c
...
...
@@ -1790,6 +1790,8 @@ static HRESULT HTMLXMLHttpRequestFactory_value(DispatchEx *iface, LCID lcid, WOR
}
static
const
dispex_static_data_vtbl_t
HTMLXMLHttpRequestFactory_dispex_vtbl
=
{
NULL
,
NULL
,
HTMLXMLHttpRequestFactory_value
};
...
...
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