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
69d4be9f
Commit
69d4be9f
authored
Feb 05, 2024
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Feb 05, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Return E_ABORT from postMessage called without a caller ServiceProvider.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
b9e4680d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
htmlwindow.c
dlls/mshtml/htmlwindow.c
+2
-6
events.c
dlls/mshtml/tests/events.c
+4
-1
No files found.
dlls/mshtml/htmlwindow.c
View file @
69d4be9f
...
...
@@ -2473,18 +2473,14 @@ static HRESULT post_message(HTMLInnerWindow *window, VARIANT msg, BSTR targetOri
static
HRESULT
WINAPI
HTMLWindow6_postMessage
(
IHTMLWindow6
*
iface
,
BSTR
msg
,
VARIANT
targetOrigin
)
{
HTMLWindow
*
This
=
impl_from_IHTMLWindow6
(
iface
);
VARIANT
var
,
transfer
;
TRACE
(
"(%p)->(%s %s)
\n
"
,
This
,
debugstr_w
(
msg
),
debugstr_variant
(
&
targetOrigin
));
if
(
V_VT
(
&
targetOrigin
)
!=
VT_BSTR
)
return
E_INVALIDARG
;
V_VT
(
&
var
)
=
VT_BSTR
;
V_BSTR
(
&
var
)
=
msg
;
V_VT
(
&
transfer
)
=
VT_EMPTY
;
return
post_message
(
This
->
inner_window
,
var
,
V_BSTR
(
&
targetOrigin
),
transfer
,
NULL
,
dispex_compat_mode
(
&
This
->
inner_window
->
event_target
.
dispex
));
/* This can't obtain the source, and never works even in IE9+ modes... */
return
E_ABORT
;
}
static
HRESULT
WINAPI
HTMLWindow6_toStaticHTML
(
IHTMLWindow6
*
iface
,
BSTR
bstrHTML
,
BSTR
*
pbstrStaticHTML
)
...
...
dlls/mshtml/tests/events.c
View file @
69d4be9f
...
...
@@ -3218,7 +3218,6 @@ static void test_message_event(IHTMLDocument2 *doc)
ok
(
hres
==
S_OK
,
"get_onmessage failed: %08lx
\n
"
,
hres
);
ok
(
V_VT
(
&
v
[
0
])
==
VT_DISPATCH
,
"V_VT(onmessage) = %d
\n
"
,
V_VT
(
&
v
[
0
]));
ok
(
V_DISPATCH
(
&
v
[
0
])
==
(
IDispatch
*
)
&
onmessage_obj
,
"V_DISPATCH(onmessage) = %p
\n
"
,
V_DISPATCH
(
&
v
[
0
]));
IHTMLWindow6_Release
(
window6
);
if
(
document_mode
>=
9
)
add_event_listener
((
IUnknown
*
)
doc
,
L"message"
,
(
IDispatch
*
)
&
onmessage_obj
,
VARIANT_TRUE
);
...
...
@@ -3227,6 +3226,10 @@ static void test_message_event(IHTMLDocument2 *doc)
V_BSTR
(
&
v
[
1
])
=
SysAllocString
(
L"foobar"
);
V_VT
(
&
v
[
0
])
=
VT_BSTR
;
V_BSTR
(
&
v
[
0
])
=
SysAllocString
(
L"*"
);
bstr
=
SysAllocString
(
L"foobar"
);
hres
=
IHTMLWindow6_postMessage
(
window6
,
V_BSTR
(
&
v
[
1
]),
v
[
0
]);
ok
(
hres
==
E_ABORT
,
"postMessage returned: %08lx
\n
"
,
hres
);
IHTMLWindow6_Release
(
window6
);
hres
=
IHTMLWindow2_QueryInterface
(
window
,
&
IID_IDispatchEx
,
(
void
**
)
&
dispex
);
ok
(
hres
==
S_OK
,
"Could not get IDispatchEx iface: %08lx
\n
"
,
hres
);
...
...
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