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
de720483
Commit
de720483
authored
Aug 22, 2023
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Aug 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement Cycle Collection for DOMTokenList.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
e7d5c06b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
htmlelem.c
dlls/mshtml/htmlelem.c
+11
-9
No files found.
dlls/mshtml/htmlelem.c
View file @
de720483
...
...
@@ -7374,8 +7374,6 @@ struct token_list {
DispatchEx
dispex
;
IWineDOMTokenList
IWineDOMTokenList_iface
;
IHTMLElement
*
element
;
LONG
ref
;
};
static
inline
struct
token_list
*
impl_from_IWineDOMTokenList
(
IWineDOMTokenList
*
iface
)
...
...
@@ -7393,7 +7391,7 @@ static HRESULT WINAPI token_list_QueryInterface(IWineDOMTokenList *iface, REFIID
*
ppv
=
&
token_list
->
IWineDOMTokenList_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IWineDOMTokenList
,
riid
))
{
*
ppv
=
&
token_list
->
IWineDOMTokenList_iface
;
}
else
if
(
dispex_query_interface
_no_cc
(
&
token_list
->
dispex
,
riid
,
ppv
))
{
}
else
if
(
dispex_query_interface
(
&
token_list
->
dispex
,
riid
,
ppv
))
{
return
*
ppv
?
S_OK
:
E_NOINTERFACE
;
}
else
{
WARN
(
"(%p)->(%s %p)
\n
"
,
token_list
,
debugstr_mshtml_guid
(
riid
),
ppv
);
...
...
@@ -7408,7 +7406,7 @@ static HRESULT WINAPI token_list_QueryInterface(IWineDOMTokenList *iface, REFIID
static
ULONG
WINAPI
token_list_AddRef
(
IWineDOMTokenList
*
iface
)
{
struct
token_list
*
token_list
=
impl_from_IWineDOMTokenList
(
iface
);
LONG
ref
=
InterlockedIncrement
(
&
token_list
->
ref
);
LONG
ref
=
dispex_ref_incr
(
&
token_list
->
dispex
);
TRACE
(
"(%p) ref=%ld
\n
"
,
token_list
,
ref
);
...
...
@@ -7418,13 +7416,10 @@ static ULONG WINAPI token_list_AddRef(IWineDOMTokenList *iface)
static
ULONG
WINAPI
token_list_Release
(
IWineDOMTokenList
*
iface
)
{
struct
token_list
*
token_list
=
impl_from_IWineDOMTokenList
(
iface
);
LONG
ref
=
InterlockedDecrement
(
&
token_list
->
ref
);
LONG
ref
=
dispex_ref_decr
(
&
token_list
->
dispex
);
TRACE
(
"(%p) ref=%ld
\n
"
,
token_list
,
ref
);
if
(
!
ref
)
release_dispex
(
&
token_list
->
dispex
);
return
ref
;
}
...
...
@@ -7742,6 +7737,13 @@ static inline struct token_list *token_list_from_DispatchEx(DispatchEx *iface)
return
CONTAINING_RECORD
(
iface
,
struct
token_list
,
dispex
);
}
static
void
token_list_traverse
(
DispatchEx
*
dispex
,
nsCycleCollectionTraversalCallback
*
cb
)
{
struct
token_list
*
token_list
=
token_list_from_DispatchEx
(
dispex
);
if
(
token_list
->
element
)
note_cc_edge
((
nsISupports
*
)
token_list
->
element
,
"element"
,
cb
);
}
static
void
token_list_unlink
(
DispatchEx
*
dispex
)
{
struct
token_list
*
token_list
=
token_list_from_DispatchEx
(
dispex
);
...
...
@@ -7830,6 +7832,7 @@ static HRESULT token_list_invoke(DispatchEx *dispex, DISPID id, LCID lcid, WORD
static
const
dispex_static_data_vtbl_t
token_list_dispex_vtbl
=
{
.
destructor
=
token_list_destructor
,
.
traverse
=
token_list_traverse
,
.
unlink
=
token_list_unlink
,
.
value
=
token_list_value
,
.
get_dispid
=
token_list_get_dispid
,
...
...
@@ -7860,7 +7863,6 @@ static HRESULT create_token_list(compat_mode_t compat_mode, IHTMLElement *elemen
}
obj
->
IWineDOMTokenList_iface
.
lpVtbl
=
&
WineDOMTokenListVtbl
;
obj
->
ref
=
1
;
init_dispatch
(
&
obj
->
dispex
,
(
IUnknown
*
)
&
obj
->
IWineDOMTokenList_iface
,
&
token_list_dispex
,
compat_mode
);
IHTMLElement_AddRef
(
element
);
obj
->
element
=
element
;
...
...
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