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
406d66f8
Commit
406d66f8
authored
Mar 08, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 08, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Always use get_channel_window to get window in nsIChannel::AsyncOpen.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4accd13d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
69 deletions
+5
-69
nsio.c
dlls/mshtml/nsio.c
+5
-69
No files found.
dlls/mshtml/nsio.c
View file @
406d66f8
...
...
@@ -902,53 +902,6 @@ static nsresult NSAPI nsChannel_Open2(nsIHttpChannel *iface, nsIInputStream **_r
return
NS_ERROR_NOT_IMPLEMENTED
;
}
static
HTMLOuterWindow
*
get_window_from_load_group
(
nsChannel
*
This
)
{
HTMLOuterWindow
*
window
;
nsIChannel
*
channel
;
nsIRequest
*
req
;
nsWineURI
*
wine_uri
;
nsIURI
*
uri
;
nsresult
nsres
;
nsres
=
nsILoadGroup_GetDefaultLoadRequest
(
This
->
load_group
,
&
req
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"GetDefaultLoadRequest failed: %08x
\n
"
,
nsres
);
return
NULL
;
}
if
(
!
req
)
return
NULL
;
nsres
=
nsIRequest_QueryInterface
(
req
,
&
IID_nsIChannel
,
(
void
**
)
&
channel
);
nsIRequest_Release
(
req
);
if
(
NS_FAILED
(
nsres
))
{
WARN
(
"Could not get nsIChannel interface: %08x
\n
"
,
nsres
);
return
NULL
;
}
nsres
=
nsIChannel_GetURI
(
channel
,
&
uri
);
nsIChannel_Release
(
channel
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"GetURI failed: %08x
\n
"
,
nsres
);
return
NULL
;
}
nsres
=
nsIURI_QueryInterface
(
uri
,
&
IID_nsWineURI
,
(
void
**
)
&
wine_uri
);
nsIURI_Release
(
uri
);
if
(
NS_FAILED
(
nsres
))
{
TRACE
(
"Could not get nsWineURI: %08x
\n
"
,
nsres
);
return
NULL
;
}
window
=
wine_uri
->
window_ref
?
wine_uri
->
window_ref
->
window
:
NULL
;
if
(
window
)
IHTMLWindow2_AddRef
(
&
window
->
base
.
IHTMLWindow2_iface
);
nsIFileURL_Release
(
&
wine_uri
->
nsIFileURL_iface
);
return
window
;
}
static
HTMLOuterWindow
*
get_channel_window
(
nsChannel
*
This
)
{
nsIWebProgress
*
web_progress
=
NULL
;
...
...
@@ -1102,33 +1055,16 @@ static nsresult NSAPI nsChannel_AsyncOpen(nsIHttpChannel *iface, nsIStreamListen
}
}
is_document_channel
=
!!
(
This
->
load_flags
&
LOAD_DOCUMENT_URI
);
if
(
is_document_channel
)
{
window
=
get_channel_window
(
This
);
if
(
window
)
set_uri_window
(
This
->
uri
,
window
);
}
if
(
!
window
)
{
if
(
This
->
uri
->
window_ref
&&
This
->
uri
->
window_ref
->
window
)
{
window
=
This
->
uri
->
window_ref
->
window
;
IHTMLWindow2_AddRef
(
&
window
->
base
.
IHTMLWindow2_iface
);
}
else
{
/* FIXME: Analyze removing get_window_from_load_group call */
if
(
This
->
load_group
)
window
=
get_window_from_load_group
(
This
);
if
(
!
window
)
window
=
get_channel_window
(
This
);
if
(
window
)
set_uri_window
(
This
->
uri
,
window
);
}
}
window
=
get_channel_window
(
This
);
if
(
!
window
)
{
ERR
(
"window = NULL
\n
"
);
return
NS_ERROR_UNEXPECTED
;
}
is_document_channel
=
!!
(
This
->
load_flags
&
LOAD_DOCUMENT_URI
);
if
(
is_document_channel
)
set_uri_window
(
This
->
uri
,
window
);
if
(
is_document_channel
&&
window
==
window
->
doc_obj
->
basedoc
.
window
)
{
if
(
This
->
uri
->
channel_bsc
)
{
channelbsc_set_channel
(
This
->
uri
->
channel_bsc
,
This
,
aListener
,
aContext
);
...
...
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