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
159b6d75
Commit
159b6d75
authored
Aug 03, 2023
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Aug 04, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use unlink and destructor in the vtbl for HTMLSelectionObject.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
9541020f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
8 deletions
+28
-8
selection.c
dlls/mshtml/selection.c
+28
-8
No files found.
dlls/mshtml/selection.c
View file @
159b6d75
...
...
@@ -93,14 +93,8 @@ static ULONG WINAPI HTMLSelectionObject_Release(IHTMLSelectionObject *iface)
TRACE
(
"(%p) ref=%ld
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
if
(
This
->
nsselection
)
nsISelection_Release
(
This
->
nsselection
);
if
(
This
->
doc
)
list_remove
(
&
This
->
entry
);
if
(
!
ref
)
release_dispex
(
&
This
->
dispex
);
free
(
This
);
}
return
ref
;
}
...
...
@@ -329,6 +323,32 @@ static const IHTMLSelectionObject2Vtbl HTMLSelectionObject2Vtbl = {
HTMLSelectionObject2_get_typeDetail
};
static
inline
HTMLSelectionObject
*
impl_from_DispatchEx
(
DispatchEx
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
HTMLSelectionObject
,
dispex
);
}
static
void
HTMLSelectionObject_unlink
(
DispatchEx
*
dispex
)
{
HTMLSelectionObject
*
This
=
impl_from_DispatchEx
(
dispex
);
unlink_ref
(
&
This
->
nsselection
);
if
(
This
->
doc
)
{
This
->
doc
=
NULL
;
list_remove
(
&
This
->
entry
);
}
}
static
void
HTMLSelectionObject_destructor
(
DispatchEx
*
dispex
)
{
HTMLSelectionObject
*
This
=
impl_from_DispatchEx
(
dispex
);
free
(
This
);
}
static
const
dispex_static_data_vtbl_t
HTMLSelectionObject_dispex_vtbl
=
{
HTMLSelectionObject_destructor
,
HTMLSelectionObject_unlink
};
static
const
tid_t
HTMLSelectionObject_iface_tids
[]
=
{
IHTMLSelectionObject_tid
,
IHTMLSelectionObject2_tid
,
...
...
@@ -336,7 +356,7 @@ static const tid_t HTMLSelectionObject_iface_tids[] = {
};
static
dispex_static_data_t
HTMLSelectionObject_dispex
=
{
L"MSSelection"
,
NULL
,
&
HTMLSelectionObject_dispex_vtbl
,
IHTMLSelectionObject_tid
,
/* FIXME: We have a test for that, but it doesn't expose IHTMLSelectionObject2 iface. */
HTMLSelectionObject_iface_tids
};
...
...
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