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
f888c91b
Commit
f888c91b
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 HTMLSelectionObject.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
684aa5bb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
selection.c
dlls/mshtml/selection.c
+11
-9
No files found.
dlls/mshtml/selection.c
View file @
f888c91b
...
...
@@ -36,8 +36,6 @@ typedef struct {
IHTMLSelectionObject
IHTMLSelectionObject_iface
;
IHTMLSelectionObject2
IHTMLSelectionObject2_iface
;
LONG
ref
;
nsISelection
*
nsselection
;
HTMLDocumentNode
*
doc
;
...
...
@@ -64,7 +62,7 @@ static HRESULT WINAPI HTMLSelectionObject_QueryInterface(IHTMLSelectionObject *i
*
ppv
=
&
This
->
IHTMLSelectionObject_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLSelectionObject2
,
riid
))
{
*
ppv
=
&
This
->
IHTMLSelectionObject2_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
{
*
ppv
=
NULL
;
...
...
@@ -79,7 +77,7 @@ static HRESULT WINAPI HTMLSelectionObject_QueryInterface(IHTMLSelectionObject *i
static
ULONG
WINAPI
HTMLSelectionObject_AddRef
(
IHTMLSelectionObject
*
iface
)
{
HTMLSelectionObject
*
This
=
impl_from_IHTMLSelectionObject
(
iface
);
LONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
LONG
ref
=
dispex_ref_incr
(
&
This
->
dispex
);
TRACE
(
"(%p) ref=%ld
\n
"
,
This
,
ref
);
...
...
@@ -89,13 +87,10 @@ static ULONG WINAPI HTMLSelectionObject_AddRef(IHTMLSelectionObject *iface)
static
ULONG
WINAPI
HTMLSelectionObject_Release
(
IHTMLSelectionObject
*
iface
)
{
HTMLSelectionObject
*
This
=
impl_from_IHTMLSelectionObject
(
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
;
}
...
...
@@ -328,6 +323,13 @@ static inline HTMLSelectionObject *impl_from_DispatchEx(DispatchEx *iface)
return
CONTAINING_RECORD
(
iface
,
HTMLSelectionObject
,
dispex
);
}
static
void
HTMLSelectionObject_traverse
(
DispatchEx
*
dispex
,
nsCycleCollectionTraversalCallback
*
cb
)
{
HTMLSelectionObject
*
This
=
impl_from_DispatchEx
(
dispex
);
if
(
This
->
nsselection
)
note_cc_edge
((
nsISupports
*
)
This
->
nsselection
,
"nsselection"
,
cb
);
}
static
void
HTMLSelectionObject_unlink
(
DispatchEx
*
dispex
)
{
HTMLSelectionObject
*
This
=
impl_from_DispatchEx
(
dispex
);
...
...
@@ -346,6 +348,7 @@ static void HTMLSelectionObject_destructor(DispatchEx *dispex)
static
const
dispex_static_data_vtbl_t
HTMLSelectionObject_dispex_vtbl
=
{
.
destructor
=
HTMLSelectionObject_destructor
,
.
traverse
=
HTMLSelectionObject_traverse
,
.
unlink
=
HTMLSelectionObject_unlink
};
...
...
@@ -374,7 +377,6 @@ HRESULT HTMLSelectionObject_Create(HTMLDocumentNode *doc, nsISelection *nsselect
selection
->
IHTMLSelectionObject_iface
.
lpVtbl
=
&
HTMLSelectionObjectVtbl
;
selection
->
IHTMLSelectionObject2_iface
.
lpVtbl
=
&
HTMLSelectionObject2Vtbl
;
selection
->
ref
=
1
;
selection
->
nsselection
=
nsselection
;
/* We shouldn't call AddRef here */
selection
->
doc
=
doc
;
...
...
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