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
0c0cbb5a
Commit
0c0cbb5a
authored
Aug 21, 2023
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Aug 21, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement Cycle Collection for HTMLPerformance.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
0afb0b6b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
omnavigator.c
dlls/mshtml/omnavigator.c
+13
-9
No files found.
dlls/mshtml/omnavigator.c
View file @
0c0cbb5a
...
...
@@ -2183,8 +2183,6 @@ typedef struct {
DispatchEx
dispex
;
IHTMLPerformance
IHTMLPerformance_iface
;
LONG
ref
;
IHTMLPerformanceNavigation
*
navigation
;
HTMLPerformanceTiming
*
timing
;
}
HTMLPerformance
;
...
...
@@ -2204,7 +2202,7 @@ static HRESULT WINAPI HTMLPerformance_QueryInterface(IHTMLPerformance *iface, RE
*
ppv
=
&
This
->
IHTMLPerformance_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLPerformance
,
riid
))
{
*
ppv
=
&
This
->
IHTMLPerformance_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
));
...
...
@@ -2219,7 +2217,7 @@ static HRESULT WINAPI HTMLPerformance_QueryInterface(IHTMLPerformance *iface, RE
static
ULONG
WINAPI
HTMLPerformance_AddRef
(
IHTMLPerformance
*
iface
)
{
HTMLPerformance
*
This
=
impl_from_IHTMLPerformance
(
iface
);
LONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
LONG
ref
=
dispex_ref_incr
(
&
This
->
dispex
);
TRACE
(
"(%p) ref=%ld
\n
"
,
This
,
ref
);
...
...
@@ -2229,13 +2227,10 @@ static ULONG WINAPI HTMLPerformance_AddRef(IHTMLPerformance *iface)
static
ULONG
WINAPI
HTMLPerformance_Release
(
IHTMLPerformance
*
iface
)
{
HTMLPerformance
*
This
=
impl_from_IHTMLPerformance
(
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
;
}
...
...
@@ -2348,6 +2343,15 @@ static inline HTMLPerformance *HTMLPerformance_from_DispatchEx(DispatchEx *iface
return
CONTAINING_RECORD
(
iface
,
HTMLPerformance
,
dispex
);
}
static
void
HTMLPerformance_traverse
(
DispatchEx
*
dispex
,
nsCycleCollectionTraversalCallback
*
cb
)
{
HTMLPerformance
*
This
=
HTMLPerformance_from_DispatchEx
(
dispex
);
if
(
This
->
navigation
)
note_cc_edge
((
nsISupports
*
)
This
->
navigation
,
"navigation"
,
cb
);
if
(
This
->
timing
)
note_cc_edge
((
nsISupports
*
)
&
This
->
timing
->
IHTMLPerformanceTiming_iface
,
"timing"
,
cb
);
}
static
void
HTMLPerformance_unlink
(
DispatchEx
*
dispex
)
{
HTMLPerformance
*
This
=
HTMLPerformance_from_DispatchEx
(
dispex
);
...
...
@@ -2367,6 +2371,7 @@ static void HTMLPerformance_destructor(DispatchEx *dispex)
static
const
dispex_static_data_vtbl_t
HTMLPerformance_dispex_vtbl
=
{
.
destructor
=
HTMLPerformance_destructor
,
.
traverse
=
HTMLPerformance_traverse
,
.
unlink
=
HTMLPerformance_unlink
};
...
...
@@ -2391,7 +2396,6 @@ HRESULT create_performance(HTMLInnerWindow *window, IHTMLPerformance **ret)
return
E_OUTOFMEMORY
;
performance
->
IHTMLPerformance_iface
.
lpVtbl
=
&
HTMLPerformanceVtbl
;
performance
->
ref
=
1
;
init_dispatch
(
&
performance
->
dispex
,
(
IUnknown
*
)
&
performance
->
IHTMLPerformance_iface
,
&
HTMLPerformance_dispex
,
compat_mode
);
...
...
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