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
c323d9c3
Commit
c323d9c3
authored
Nov 01, 2023
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Nov 01, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Keep ref from LocalStorage and SessionStorage to the inner window.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
5aa68f38
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
12 deletions
+22
-12
htmlstorage.c
dlls/mshtml/htmlstorage.c
+22
-8
htmlwindow.c
dlls/mshtml/htmlwindow.c
+0
-2
mshtml_private.h
dlls/mshtml/mshtml_private.h
+0
-2
No files found.
dlls/mshtml/htmlstorage.c
View file @
c323d9c3
...
...
@@ -322,8 +322,6 @@ static HRESULT send_storage_event(HTMLStorage *storage, BSTR key, BSTR old_value
HRESULT
hres
=
S_OK
;
ctx
.
url
=
NULL
;
if
(
!
window
)
goto
done
;
if
(
window
->
base
.
outer_window
->
uri_nofrag
)
{
hres
=
IUri_GetDisplayUri
(
window
->
base
.
outer_window
->
uri_nofrag
,
&
ctx
.
url
);
if
(
hres
!=
S_OK
)
...
...
@@ -1041,6 +1039,25 @@ static void *HTMLStorage_query_interface(DispatchEx *dispex, REFIID riid)
return
NULL
;
}
static
void
HTMLStorage_traverse
(
DispatchEx
*
dispex
,
nsCycleCollectionTraversalCallback
*
cb
)
{
HTMLStorage
*
This
=
impl_from_DispatchEx
(
dispex
);
if
(
This
->
window
)
note_cc_edge
((
nsISupports
*
)
&
This
->
window
->
base
.
IHTMLWindow2_iface
,
"window"
,
cb
);
}
static
void
HTMLStorage_unlink
(
DispatchEx
*
dispex
)
{
HTMLStorage
*
This
=
impl_from_DispatchEx
(
dispex
);
if
(
This
->
window
)
{
HTMLInnerWindow
*
window
=
This
->
window
;
This
->
window
=
NULL
;
IHTMLWindow2_Release
(
&
window
->
base
.
IHTMLWindow2_iface
);
}
}
static
void
HTMLStorage_destructor
(
DispatchEx
*
dispex
)
{
HTMLStorage
*
This
=
impl_from_DispatchEx
(
dispex
);
...
...
@@ -1298,6 +1315,8 @@ static HRESULT HTMLStorage_next_dispid(DispatchEx *dispex, DISPID id, DISPID *pi
static
const
dispex_static_data_vtbl_t
HTMLStorage_dispex_vtbl
=
{
.
query_interface
=
HTMLStorage_query_interface
,
.
destructor
=
HTMLStorage_destructor
,
.
traverse
=
HTMLStorage_traverse
,
.
unlink
=
HTMLStorage_unlink
,
.
get_dispid
=
HTMLStorage_get_dispid
,
.
get_name
=
HTMLStorage_get_name
,
.
invoke
=
HTMLStorage_invoke
,
...
...
@@ -1464,15 +1483,10 @@ HRESULT create_html_storage(HTMLInnerWindow *window, BOOL local, IHTMLStorage **
storage
->
IHTMLStorage_iface
.
lpVtbl
=
&
HTMLStorageVtbl
;
storage
->
window
=
window
;
IHTMLWindow2_AddRef
(
&
window
->
base
.
IHTMLWindow2_iface
);
init_dispatch
(
&
storage
->
dispex
,
&
HTMLStorage_dispex
,
dispex_compat_mode
(
&
window
->
event_target
.
dispex
));
*
p
=
&
storage
->
IHTMLStorage_iface
;
return
S_OK
;
}
void
detach_html_storage
(
IHTMLStorage
*
iface
)
{
HTMLStorage
*
storage
=
impl_from_IHTMLStorage
(
iface
);
storage
->
window
=
NULL
;
}
dlls/mshtml/htmlwindow.c
View file @
c323d9c3
...
...
@@ -4001,13 +4001,11 @@ static void HTMLWindow_unlink(DispatchEx *dispex)
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
);
}
...
...
dlls/mshtml/mshtml_private.h
View file @
c323d9c3
...
...
@@ -998,9 +998,7 @@ HRESULT create_history(HTMLInnerWindow*,OmHistory**);
HRESULT
create_namespace_collection
(
compat_mode_t
,
IHTMLNamespaceCollection
**
);
HRESULT
create_dom_implementation
(
HTMLDocumentNode
*
,
IHTMLDOMImplementation
**
);
void
detach_dom_implementation
(
IHTMLDOMImplementation
*
);
HRESULT
create_html_storage
(
HTMLInnerWindow
*
,
BOOL
,
IHTMLStorage
**
);
void
detach_html_storage
(
IHTMLStorage
*
);
void
HTMLDocument_View_Init
(
HTMLDocumentObj
*
);
void
HTMLDocumentObj_Persist_Init
(
HTMLDocumentObj
*
);
...
...
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