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
4aad315a
Commit
4aad315a
authored
Dec 01, 2023
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 01, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Return failure in IHTMLDocument2::get_URL for detached documents.
parent
58d4f541
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
htmldoc.c
dlls/mshtml/htmldoc.c
+9
-1
navigation.js
dlls/mshtml/tests/navigation.js
+1
-1
No files found.
dlls/mshtml/htmldoc.c
View file @
4aad315a
...
...
@@ -1108,7 +1108,15 @@ static HRESULT WINAPI HTMLDocument_get_URL(IHTMLDocument2 *iface, BSTR *p)
TRACE
(
"(%p)->(%p)
\n
"
,
iface
,
p
);
*
p
=
SysAllocString
(
This
->
outer_window
&&
This
->
outer_window
->
url
?
This
->
outer_window
->
url
:
L"about:blank"
);
if
(
This
->
window
&&
!
This
->
window
->
base
.
outer_window
)
{
WARN
(
"detached document
\n
"
);
return
E_FAIL
;
}
if
(
This
->
window
&&
This
->
window
->
base
.
outer_window
->
url
)
*
p
=
SysAllocString
(
This
->
window
->
base
.
outer_window
->
url
);
else
*
p
=
SysAllocString
(
L"about:blank"
);
return
*
p
?
S_OK
:
E_OUTOFMEMORY
;
}
...
...
dlls/mshtml/tests/navigation.js
View file @
4aad315a
...
...
@@ -119,7 +119,7 @@ function detached_iframe_doc() {
expect_exception
(
function
()
{
origDoc
.
onclick
;
},
true
);
expect_exception
(
function
()
{
origDoc
.
toString
;
},
true
);
expect_exception
(
function
()
{
origDoc
.
toString
();
},
true
);
expect_exception
(
function
()
{
origDoc
.
URL
;
}
,
true
);
expect_exception
(
function
()
{
origDoc
.
URL
;
});
next_test
();
});
...
...
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