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
48dd9471
Commit
48dd9471
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 HTMLDOMImplementation.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
17dc0be9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
omnavigator.c
dlls/mshtml/omnavigator.c
+11
-9
No files found.
dlls/mshtml/omnavigator.c
View file @
48dd9471
...
...
@@ -47,8 +47,6 @@ typedef struct {
IHTMLDOMImplementation
IHTMLDOMImplementation_iface
;
IHTMLDOMImplementation2
IHTMLDOMImplementation2_iface
;
LONG
ref
;
nsIDOMDOMImplementation
*
implementation
;
GeckoBrowser
*
browser
;
}
HTMLDOMImplementation
;
...
...
@@ -68,7 +66,7 @@ static HRESULT WINAPI HTMLDOMImplementation_QueryInterface(IHTMLDOMImplementatio
*
ppv
=
&
This
->
IHTMLDOMImplementation_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLDOMImplementation2
,
riid
))
{
*
ppv
=
&
This
->
IHTMLDOMImplementation2_iface
;
}
else
if
(
dispex_query_interface
_no_cc
(
&
This
->
dispex
,
riid
,
ppv
))
{
}
else
if
(
dispex_query_interface
(
&
This
->
dispex
,
riid
,
ppv
))
{
return
*
ppv
?
S_OK
:
E_NOINTERFACE
;
}
else
{
WARN
(
"Unsupported interface %s
\n
"
,
debugstr_mshtml_guid
(
riid
));
...
...
@@ -83,7 +81,7 @@ static HRESULT WINAPI HTMLDOMImplementation_QueryInterface(IHTMLDOMImplementatio
static
ULONG
WINAPI
HTMLDOMImplementation_AddRef
(
IHTMLDOMImplementation
*
iface
)
{
HTMLDOMImplementation
*
This
=
impl_from_IHTMLDOMImplementation
(
iface
);
LONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
LONG
ref
=
dispex_ref_incr
(
&
This
->
dispex
);
TRACE
(
"(%p) ref=%ld
\n
"
,
This
,
ref
);
...
...
@@ -93,13 +91,10 @@ static ULONG WINAPI HTMLDOMImplementation_AddRef(IHTMLDOMImplementation *iface)
static
ULONG
WINAPI
HTMLDOMImplementation_Release
(
IHTMLDOMImplementation
*
iface
)
{
HTMLDOMImplementation
*
This
=
impl_from_IHTMLDOMImplementation
(
iface
);
LONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
LONG
ref
=
dispex_ref_decr
(
&
This
->
dispex
);
TRACE
(
"(%p) ref=%ld
\n
"
,
This
,
ref
);
if
(
!
ref
)
release_dispex
(
&
This
->
dispex
);
return
ref
;
}
...
...
@@ -292,6 +287,13 @@ static inline HTMLDOMImplementation *HTMLDOMImplementation_from_DispatchEx(Dispa
return
CONTAINING_RECORD
(
iface
,
HTMLDOMImplementation
,
dispex
);
}
static
void
HTMLDOMImplementation_traverse
(
DispatchEx
*
dispex
,
nsCycleCollectionTraversalCallback
*
cb
)
{
HTMLDOMImplementation
*
This
=
HTMLDOMImplementation_from_DispatchEx
(
dispex
);
if
(
This
->
implementation
)
note_cc_edge
((
nsISupports
*
)
This
->
implementation
,
"implementation"
,
cb
);
}
static
void
HTMLDOMImplementation_unlink
(
DispatchEx
*
dispex
)
{
HTMLDOMImplementation
*
This
=
HTMLDOMImplementation_from_DispatchEx
(
dispex
);
...
...
@@ -307,6 +309,7 @@ static void HTMLDOMImplementation_destructor(DispatchEx *dispex)
static
const
dispex_static_data_vtbl_t
HTMLDOMImplementation_dispex_vtbl
=
{
.
destructor
=
HTMLDOMImplementation_destructor
,
.
traverse
=
HTMLDOMImplementation_traverse
,
.
unlink
=
HTMLDOMImplementation_unlink
};
...
...
@@ -342,7 +345,6 @@ HRESULT create_dom_implementation(HTMLDocumentNode *doc_node, IHTMLDOMImplementa
dom_implementation
->
IHTMLDOMImplementation_iface
.
lpVtbl
=
&
HTMLDOMImplementationVtbl
;
dom_implementation
->
IHTMLDOMImplementation2_iface
.
lpVtbl
=
&
HTMLDOMImplementation2Vtbl
;
dom_implementation
->
ref
=
1
;
dom_implementation
->
browser
=
doc_node
->
browser
;
init_dispatch
(
&
dom_implementation
->
dispex
,
(
IUnknown
*
)
&
dom_implementation
->
IHTMLDOMImplementation_iface
,
...
...
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