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
6919d553
Commit
6919d553
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 HTMLAttributeCollection.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
d5e6c2a5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
13 deletions
+22
-13
htmlelem.c
dlls/mshtml/htmlelem.c
+22
-13
No files found.
dlls/mshtml/htmlelem.c
View file @
6919d553
...
...
@@ -8594,17 +8594,8 @@ static ULONG WINAPI HTMLAttributeCollection_Release(IHTMLAttributeCollection *if
TRACE
(
"(%p) ref=%ld
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
while
(
!
list_empty
(
&
This
->
attrs
))
{
HTMLDOMAttribute
*
attr
=
LIST_ENTRY
(
list_head
(
&
This
->
attrs
),
HTMLDOMAttribute
,
entry
);
list_remove
(
&
attr
->
entry
);
attr
->
elem
=
NULL
;
IHTMLDOMAttribute_Release
(
&
attr
->
IHTMLDOMAttribute_iface
);
}
free
(
This
);
}
if
(
!
ref
)
release_dispex
(
&
This
->
dispex
);
return
ref
;
}
...
...
@@ -8953,6 +8944,24 @@ static inline HTMLAttributeCollection *HTMLAttributeCollection_from_DispatchEx(D
return
CONTAINING_RECORD
(
iface
,
HTMLAttributeCollection
,
dispex
);
}
static
void
HTMLAttributeCollection_unlink
(
DispatchEx
*
dispex
)
{
HTMLAttributeCollection
*
This
=
HTMLAttributeCollection_from_DispatchEx
(
dispex
);
while
(
!
list_empty
(
&
This
->
attrs
))
{
HTMLDOMAttribute
*
attr
=
LIST_ENTRY
(
list_head
(
&
This
->
attrs
),
HTMLDOMAttribute
,
entry
);
list_remove
(
&
attr
->
entry
);
attr
->
elem
=
NULL
;
IHTMLDOMAttribute_Release
(
&
attr
->
IHTMLDOMAttribute_iface
);
}
}
static
void
HTMLAttributeCollection_destructor
(
DispatchEx
*
dispex
)
{
HTMLAttributeCollection
*
This
=
HTMLAttributeCollection_from_DispatchEx
(
dispex
);
free
(
This
);
}
static
HRESULT
HTMLAttributeCollection_get_dispid
(
DispatchEx
*
dispex
,
BSTR
name
,
DWORD
flags
,
DISPID
*
dispid
)
{
HTMLAttributeCollection
*
This
=
HTMLAttributeCollection_from_DispatchEx
(
dispex
);
...
...
@@ -9019,8 +9028,8 @@ static HRESULT HTMLAttributeCollection_invoke(DispatchEx *dispex, DISPID id, LCI
}
static
const
dispex_static_data_vtbl_t
HTMLAttributeCollection_dispex_vtbl
=
{
NULL
,
NULL
,
HTMLAttributeCollection_destructor
,
HTMLAttributeCollection_unlink
,
NULL
,
HTMLAttributeCollection_get_dispid
,
HTMLAttributeCollection_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