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
0c99a89b
Commit
0c99a89b
authored
Aug 04, 2023
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Aug 08, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use unlink and destructor in the vtbl for HTMLElementCollection.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
20b769dc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
11 deletions
+22
-11
htmlelemcol.c
dlls/mshtml/htmlelemcol.c
+22
-11
No files found.
dlls/mshtml/htmlelemcol.c
View file @
0c99a89b
...
...
@@ -252,16 +252,8 @@ static ULONG WINAPI HTMLElementCollection_Release(IHTMLElementCollection *iface)
TRACE
(
"(%p) ref=%ld
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
unsigned
i
;
for
(
i
=
0
;
i
<
This
->
len
;
i
++
)
node_release
(
&
This
->
elems
[
i
]
->
node
);
free
(
This
->
elems
);
if
(
!
ref
)
release_dispex
(
&
This
->
dispex
);
free
(
This
);
}
return
ref
;
}
...
...
@@ -550,6 +542,25 @@ static inline HTMLElementCollection *impl_from_DispatchEx(DispatchEx *iface)
return
CONTAINING_RECORD
(
iface
,
HTMLElementCollection
,
dispex
);
}
static
void
HTMLElementCollection_unlink
(
DispatchEx
*
dispex
)
{
HTMLElementCollection
*
This
=
impl_from_DispatchEx
(
dispex
);
unsigned
i
,
len
=
This
->
len
;
if
(
len
)
{
This
->
len
=
0
;
for
(
i
=
0
;
i
<
len
;
i
++
)
node_release
(
&
This
->
elems
[
i
]
->
node
);
free
(
This
->
elems
);
}
}
static
void
HTMLElementCollection_destructor
(
DispatchEx
*
dispex
)
{
HTMLElementCollection
*
This
=
impl_from_DispatchEx
(
dispex
);
free
(
This
);
}
#define DISPID_ELEMCOL_0 MSHTML_DISPID_CUSTOM_MIN
static
HRESULT
HTMLElementCollection_get_dispid
(
DispatchEx
*
dispex
,
BSTR
name
,
DWORD
flags
,
DISPID
*
dispid
)
...
...
@@ -622,8 +633,8 @@ static HRESULT HTMLElementCollection_invoke(DispatchEx *dispex, DISPID id, LCID
}
static
const
dispex_static_data_vtbl_t
HTMLElementColection_dispex_vtbl
=
{
NULL
,
NULL
,
HTMLElementCollection_destructor
,
HTMLElementCollection_unlink
,
NULL
,
HTMLElementCollection_get_dispid
,
HTMLElementCollection_get_name
,
...
...
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