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
a3209dae
Commit
a3209dae
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 the OmHistory to the inner window.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
c323d9c3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
3 deletions
+34
-3
htmlwindow.c
dlls/mshtml/htmlwindow.c
+0
-1
omnavigator.c
dlls/mshtml/omnavigator.c
+23
-1
events.c
dlls/mshtml/tests/events.c
+11
-1
No files found.
dlls/mshtml/htmlwindow.c
View file @
a3209dae
...
@@ -3994,7 +3994,6 @@ static void HTMLWindow_unlink(DispatchEx *dispex)
...
@@ -3994,7 +3994,6 @@ static void HTMLWindow_unlink(DispatchEx *dispex)
unlink_ref
(
&
This
->
screen
);
unlink_ref
(
&
This
->
screen
);
if
(
This
->
history
)
{
if
(
This
->
history
)
{
OmHistory
*
history
=
This
->
history
;
OmHistory
*
history
=
This
->
history
;
This
->
history
->
window
=
NULL
;
This
->
history
=
NULL
;
This
->
history
=
NULL
;
IOmHistory_Release
(
&
history
->
IOmHistory_iface
);
IOmHistory_Release
(
&
history
->
IOmHistory_iface
);
}
}
...
...
dlls/mshtml/omnavigator.c
View file @
a3209dae
...
@@ -644,7 +644,7 @@ static HRESULT WINAPI OmHistory_get_length(IOmHistory *iface, short *p)
...
@@ -644,7 +644,7 @@ static HRESULT WINAPI OmHistory_get_length(IOmHistory *iface, short *p)
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
if
(
This
->
window
&&
This
->
window
->
base
.
outer_window
)
if
(
This
->
window
->
base
.
outer_window
)
browser
=
This
->
window
->
base
.
outer_window
->
browser
;
browser
=
This
->
window
->
base
.
outer_window
->
browser
;
*
p
=
browser
&&
browser
->
doc
->
travel_log
*
p
=
browser
&&
browser
->
doc
->
travel_log
...
@@ -703,6 +703,25 @@ static void *OmHistory_query_interface(DispatchEx *dispex, REFIID riid)
...
@@ -703,6 +703,25 @@ static void *OmHistory_query_interface(DispatchEx *dispex, REFIID riid)
return
NULL
;
return
NULL
;
}
}
static
void
OmHistory_traverse
(
DispatchEx
*
dispex
,
nsCycleCollectionTraversalCallback
*
cb
)
{
OmHistory
*
This
=
OmHistory_from_DispatchEx
(
dispex
);
if
(
This
->
window
)
note_cc_edge
((
nsISupports
*
)
&
This
->
window
->
base
.
IHTMLWindow2_iface
,
"window"
,
cb
);
}
static
void
OmHistory_unlink
(
DispatchEx
*
dispex
)
{
OmHistory
*
This
=
OmHistory_from_DispatchEx
(
dispex
);
if
(
This
->
window
)
{
HTMLInnerWindow
*
window
=
This
->
window
;
This
->
window
=
NULL
;
IHTMLWindow2_Release
(
&
window
->
base
.
IHTMLWindow2_iface
);
}
}
static
void
OmHistory_destructor
(
DispatchEx
*
dispex
)
static
void
OmHistory_destructor
(
DispatchEx
*
dispex
)
{
{
OmHistory
*
This
=
OmHistory_from_DispatchEx
(
dispex
);
OmHistory
*
This
=
OmHistory_from_DispatchEx
(
dispex
);
...
@@ -712,6 +731,8 @@ static void OmHistory_destructor(DispatchEx *dispex)
...
@@ -712,6 +731,8 @@ static void OmHistory_destructor(DispatchEx *dispex)
static
const
dispex_static_data_vtbl_t
OmHistory_dispex_vtbl
=
{
static
const
dispex_static_data_vtbl_t
OmHistory_dispex_vtbl
=
{
.
query_interface
=
OmHistory_query_interface
,
.
query_interface
=
OmHistory_query_interface
,
.
destructor
=
OmHistory_destructor
,
.
destructor
=
OmHistory_destructor
,
.
traverse
=
OmHistory_traverse
,
.
unlink
=
OmHistory_unlink
,
};
};
static
const
tid_t
OmHistory_iface_tids
[]
=
{
static
const
tid_t
OmHistory_iface_tids
[]
=
{
...
@@ -738,6 +759,7 @@ HRESULT create_history(HTMLInnerWindow *window, OmHistory **ret)
...
@@ -738,6 +759,7 @@ HRESULT create_history(HTMLInnerWindow *window, OmHistory **ret)
history
->
IOmHistory_iface
.
lpVtbl
=
&
OmHistoryVtbl
;
history
->
IOmHistory_iface
.
lpVtbl
=
&
OmHistoryVtbl
;
history
->
window
=
window
;
history
->
window
=
window
;
IHTMLWindow2_AddRef
(
&
window
->
base
.
IHTMLWindow2_iface
);
*
ret
=
history
;
*
ret
=
history
;
return
S_OK
;
return
S_OK
;
...
...
dlls/mshtml/tests/events.c
View file @
a3209dae
...
@@ -3247,8 +3247,10 @@ static void test_window_refs(IHTMLDocument2 *doc)
...
@@ -3247,8 +3247,10 @@ static void test_window_refs(IHTMLDocument2 *doc)
IHTMLWindow5
*
window5
;
IHTMLWindow5
*
window5
;
IHTMLDocument6
*
doc6
;
IHTMLDocument6
*
doc6
;
IHTMLElement2
*
elem
;
IHTMLElement2
*
elem
;
IOmHistory
*
history
;
VARIANT
vempty
,
var
;
VARIANT
vempty
,
var
;
HRESULT
hres
;
HRESULT
hres
;
short
length
;
BSTR
bstr
;
BSTR
bstr
;
V_VT
(
&
vempty
)
=
VT_EMPTY
;
V_VT
(
&
vempty
)
=
VT_EMPTY
;
...
@@ -3282,6 +3284,8 @@ static void test_window_refs(IHTMLDocument2 *doc)
...
@@ -3282,6 +3284,8 @@ static void test_window_refs(IHTMLDocument2 *doc)
ok
(
hres
==
S_OK
,
"get_Image failed: %08lx
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"get_Image failed: %08lx
\n
"
,
hres
);
hres
=
IHTMLWindow2_get_Option
(
window
,
&
option_factory
);
hres
=
IHTMLWindow2_get_Option
(
window
,
&
option_factory
);
ok
(
hres
==
S_OK
,
"get_Option failed: %08lx
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"get_Option failed: %08lx
\n
"
,
hres
);
hres
=
IHTMLWindow2_get_history
(
window
,
&
history
);
ok
(
hres
==
S_OK
,
"get_history failed: %08lx
\n
"
,
hres
);
hres
=
IHTMLWindow2_get_self
(
window
,
&
self
);
hres
=
IHTMLWindow2_get_self
(
window
,
&
self
);
ok
(
hres
==
S_OK
,
"get_self failed: %08lx
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"get_self failed: %08lx
\n
"
,
hres
);
...
@@ -3316,6 +3320,12 @@ static void test_window_refs(IHTMLDocument2 *doc)
...
@@ -3316,6 +3320,12 @@ static void test_window_refs(IHTMLDocument2 *doc)
ok
(
option_elem
!=
NULL
,
"option_elem == NULL
\n
"
);
ok
(
option_elem
!=
NULL
,
"option_elem == NULL
\n
"
);
IHTMLOptionElementFactory_Release
(
option_factory
);
IHTMLOptionElementFactory_Release
(
option_factory
);
IHTMLOptionElement_Release
(
option_elem
);
IHTMLOptionElement_Release
(
option_elem
);
hres
=
IOmHistory_get_length
(
history
,
&
length
);
ok
(
hres
==
S_OK
,
"get_length failed: %08lx
\n
"
,
hres
);
todo_wine
ok
(
length
==
42
,
"length = %d
\n
"
,
length
);
IOmHistory_Release
(
history
);
}
}
static
void
test_doc_obj
(
IHTMLDocument2
*
doc
)
static
void
test_doc_obj
(
IHTMLDocument2
*
doc
)
...
@@ -4396,7 +4406,7 @@ static HRESULT WINAPI TravelLog_Clone(ITravelLog *iface, ITravelLog **pptl)
...
@@ -4396,7 +4406,7 @@ static HRESULT WINAPI TravelLog_Clone(ITravelLog *iface, ITravelLog **pptl)
static
DWORD
WINAPI
TravelLog_CountEntries
(
ITravelLog
*
iface
,
IUnknown
*
punk
)
static
DWORD
WINAPI
TravelLog_CountEntries
(
ITravelLog
*
iface
,
IUnknown
*
punk
)
{
{
return
0
;
return
42
;
}
}
static
HRESULT
WINAPI
TravelLog_Revert
(
ITravelLog
*
iface
)
static
HRESULT
WINAPI
TravelLog_Revert
(
ITravelLog
*
iface
)
...
...
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