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
6ad4dd01
Commit
6ad4dd01
authored
Aug 01, 2023
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Aug 02, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use unlink and destructor in the vtbl for inner windows.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
9bad7be3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
79 additions
and
69 deletions
+79
-69
htmlwindow.c
dlls/mshtml/htmlwindow.c
+79
-69
No files found.
dlls/mshtml/htmlwindow.c
View file @
6ad4dd01
...
...
@@ -249,72 +249,6 @@ static void release_outer_window(HTMLOuterWindow *This)
free
(
This
);
}
static
void
release_inner_window
(
HTMLInnerWindow
*
This
)
{
unsigned
i
;
TRACE
(
"%p
\n
"
,
This
);
detach_inner_window
(
This
);
if
(
This
->
doc
)
{
This
->
doc
->
window
=
NULL
;
IHTMLDOMNode_Release
(
&
This
->
doc
->
node
.
IHTMLDOMNode_iface
);
}
release_event_target
(
&
This
->
event_target
);
release_dispex
(
&
This
->
event_target
.
dispex
);
for
(
i
=
0
;
i
<
This
->
global_prop_cnt
;
i
++
)
free
(
This
->
global_props
[
i
].
name
);
free
(
This
->
global_props
);
if
(
This
->
image_factory
)
{
This
->
image_factory
->
window
=
NULL
;
IHTMLImageElementFactory_Release
(
&
This
->
image_factory
->
IHTMLImageElementFactory_iface
);
}
if
(
This
->
option_factory
)
{
This
->
option_factory
->
window
=
NULL
;
IHTMLOptionElementFactory_Release
(
&
This
->
option_factory
->
IHTMLOptionElementFactory_iface
);
}
if
(
This
->
xhr_factory
)
{
This
->
xhr_factory
->
window
=
NULL
;
IHTMLXMLHttpRequestFactory_Release
(
&
This
->
xhr_factory
->
IHTMLXMLHttpRequestFactory_iface
);
}
if
(
This
->
screen
)
IHTMLScreen_Release
(
This
->
screen
);
if
(
This
->
history
)
{
This
->
history
->
window
=
NULL
;
IOmHistory_Release
(
&
This
->
history
->
IOmHistory_iface
);
}
if
(
This
->
navigator
)
IOmNavigator_Release
(
This
->
navigator
);
if
(
This
->
session_storage
)
{
detach_html_storage
(
This
->
session_storage
);
IHTMLStorage_Release
(
This
->
session_storage
);
}
if
(
This
->
local_storage
)
{
detach_html_storage
(
This
->
local_storage
);
IHTMLStorage_Release
(
This
->
local_storage
);
}
IHTMLPerformanceTiming_Release
(
&
This
->
performance_timing
->
IHTMLPerformanceTiming_iface
);
VariantClear
(
&
This
->
performance
);
if
(
This
->
mon
)
IMoniker_Release
(
This
->
mon
);
if
(
This
->
mutation_observer_ctor
)
IDispatch_Release
(
This
->
mutation_observer_ctor
);
free
(
This
);
}
static
ULONG
WINAPI
HTMLWindow2_Release
(
IHTMLWindow2
*
iface
)
{
HTMLWindow
*
This
=
impl_from_IHTMLWindow2
(
iface
);
...
...
@@ -329,7 +263,7 @@ static ULONG WINAPI HTMLWindow2_Release(IHTMLWindow2 *iface)
if
(
is_outer_window
(
This
))
release_outer_window
(
This
->
outer_window
);
else
release_
inner_window
(
This
->
inner_window
);
release_
dispex
(
&
This
->
inner_window
->
event_target
.
dispex
);
}
return
ref
;
...
...
@@ -3785,6 +3719,82 @@ static inline HTMLInnerWindow *impl_from_DispatchEx(DispatchEx *iface)
return
CONTAINING_RECORD
(
iface
,
HTMLInnerWindow
,
event_target
.
dispex
);
}
static
void
HTMLWindow_unlink
(
DispatchEx
*
dispex
)
{
HTMLInnerWindow
*
This
=
impl_from_DispatchEx
(
dispex
);
TRACE
(
"%p
\n
"
,
This
);
unlink_ref
(
&
This
->
base
.
console
);
detach_inner_window
(
This
);
if
(
This
->
doc
)
{
HTMLDocumentNode
*
doc
=
This
->
doc
;
This
->
doc
->
window
=
NULL
;
This
->
doc
=
NULL
;
IHTMLDOMNode_Release
(
&
doc
->
node
.
IHTMLDOMNode_iface
);
}
release_event_target
(
&
This
->
event_target
);
if
(
This
->
image_factory
)
{
HTMLImageElementFactory
*
image_factory
=
This
->
image_factory
;
This
->
image_factory
->
window
=
NULL
;
This
->
image_factory
=
NULL
;
IHTMLImageElementFactory_Release
(
&
image_factory
->
IHTMLImageElementFactory_iface
);
}
if
(
This
->
option_factory
)
{
HTMLOptionElementFactory
*
option_factory
=
This
->
option_factory
;
This
->
option_factory
->
window
=
NULL
;
This
->
option_factory
=
NULL
;
IHTMLOptionElementFactory_Release
(
&
option_factory
->
IHTMLOptionElementFactory_iface
);
}
if
(
This
->
xhr_factory
)
{
HTMLXMLHttpRequestFactory
*
xhr_factory
=
This
->
xhr_factory
;
This
->
xhr_factory
->
window
=
NULL
;
This
->
xhr_factory
=
NULL
;
IHTMLXMLHttpRequestFactory_Release
(
&
xhr_factory
->
IHTMLXMLHttpRequestFactory_iface
);
}
unlink_ref
(
&
This
->
mutation_observer_ctor
);
unlink_ref
(
&
This
->
screen
);
if
(
This
->
history
)
{
OmHistory
*
history
=
This
->
history
;
This
->
history
->
window
=
NULL
;
This
->
history
=
NULL
;
IOmHistory_Release
(
&
history
->
IOmHistory_iface
);
}
unlink_ref
(
&
This
->
navigator
);
if
(
This
->
session_storage
)
{
IHTMLStorage
*
session_storage
=
This
->
session_storage
;
detach_html_storage
(
session_storage
);
This
->
session_storage
=
NULL
;
IHTMLStorage_Release
(
session_storage
);
}
if
(
This
->
local_storage
)
{
IHTMLStorage
*
local_storage
=
This
->
local_storage
;
detach_html_storage
(
local_storage
);
This
->
local_storage
=
NULL
;
IHTMLStorage_Release
(
local_storage
);
}
IHTMLPerformanceTiming_Release
(
&
This
->
performance_timing
->
IHTMLPerformanceTiming_iface
);
VariantClear
(
&
This
->
performance
);
}
static
void
HTMLWindow_destructor
(
DispatchEx
*
dispex
)
{
HTMLInnerWindow
*
This
=
impl_from_DispatchEx
(
dispex
);
unsigned
i
;
for
(
i
=
0
;
i
<
This
->
global_prop_cnt
;
i
++
)
free
(
This
->
global_props
[
i
].
name
);
free
(
This
->
global_props
);
if
(
This
->
mon
)
IMoniker_Release
(
This
->
mon
);
free
(
This
);
}
static
HRESULT
HTMLWindow_get_name
(
DispatchEx
*
dispex
,
DISPID
id
,
BSTR
*
name
)
{
HTMLInnerWindow
*
This
=
impl_from_DispatchEx
(
dispex
);
...
...
@@ -4028,8 +4038,8 @@ static IHTMLEventObj *HTMLWindow_set_current_event(DispatchEx *dispex, IHTMLEven
static
const
event_target_vtbl_t
HTMLWindow_event_target_vtbl
=
{
{
NULL
,
NULL
,
HTMLWindow_destructor
,
HTMLWindow_unlink
,
NULL
,
NULL
,
HTMLWindow_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