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
69f4a1bf
Commit
69f4a1bf
authored
Jun 25, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 27, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Make sure we always create nsWineURI with valid IUri.
parent
95d769a0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
16 deletions
+25
-16
nsio.c
dlls/mshtml/nsio.c
+25
-16
No files found.
dlls/mshtml/nsio.c
View file @
69f4a1bf
...
...
@@ -95,7 +95,7 @@ static BOOL ensure_uri(nsWineURI *This)
return
TRUE
;
}
static
nsresult
create_
uri
(
nsIURI
*
,
HTMLWindow
*
,
NSContainer
*
,
nsWineURI
**
);
static
nsresult
create_
nsuri
(
IUri
*
,
nsIURI
*
,
HTMLWindow
*
,
NSContainer
*
,
nsWineURI
**
);
static
const
char
*
debugstr_nsacstr
(
const
nsACString
*
nsstr
)
{
...
...
@@ -2111,14 +2111,12 @@ static nsresult NSAPI nsURI_Clone(nsIURL *iface, nsIURI **_retval)
}
}
nsres
=
create_
uri
(
nsuri
,
This
->
window_ref
?
This
->
window_ref
->
window
:
NULL
,
This
->
container
,
&
wine_uri
);
nsres
=
create_
nsuri
(
This
->
uri
,
nsuri
,
This
->
window_ref
?
This
->
window_ref
->
window
:
NULL
,
This
->
container
,
&
wine_uri
);
if
(
NS_FAILED
(
nsres
))
{
WARN
(
"create_uri failed: %08x
\n
"
,
nsres
);
WARN
(
"create_
ns
uri failed: %08x
\n
"
,
nsres
);
return
nsres
;
}
wine_uri
->
uri
=
This
->
uri
;
IUri_AddRef
(
wine_uri
->
uri
);
sync_wine_url
(
wine_uri
);
*
_retval
=
(
nsIURI
*
)
&
wine_uri
->
nsIURL_iface
;
...
...
@@ -2515,7 +2513,7 @@ static const nsIURLVtbl nsURLVtbl = {
nsURL_GetRelativeSpec
};
static
nsresult
create_
uri
(
nsIURI
*
nsuri
,
HTMLWindow
*
window
,
NSContainer
*
container
,
nsWineURI
**
_retval
)
static
nsresult
create_
nsuri
(
IUri
*
iuri
,
nsIURI
*
nsuri
,
HTMLWindow
*
window
,
NSContainer
*
container
,
nsWineURI
**
_retval
)
{
nsWineURI
*
ret
=
heap_alloc_zero
(
sizeof
(
nsWineURI
));
...
...
@@ -2526,6 +2524,9 @@ static nsresult create_uri(nsIURI *nsuri, HTMLWindow *window, NSContainer *conta
set_uri_nscontainer
(
ret
,
container
);
set_uri_window
(
ret
,
window
);
IUri_AddRef
(
iuri
);
ret
->
uri
=
iuri
;
if
(
nsuri
)
nsIURI_QueryInterface
(
nsuri
,
&
IID_nsIURL
,
(
void
**
)
&
ret
->
nsurl
);
...
...
@@ -2537,9 +2538,16 @@ static nsresult create_uri(nsIURI *nsuri, HTMLWindow *window, NSContainer *conta
HRESULT
create_doc_uri
(
HTMLWindow
*
window
,
WCHAR
*
url
,
nsWineURI
**
ret
)
{
nsWineURI
*
uri
;
IUri
*
iuri
;
nsresult
nsres
;
HRESULT
hres
;
hres
=
CreateUri
(
url
,
0
,
0
,
&
iuri
);
if
(
FAILED
(
hres
))
return
hres
;
nsres
=
create_uri
(
NULL
,
window
,
window
->
doc_obj
->
nscontainer
,
&
uri
);
nsres
=
create_nsuri
(
iuri
,
NULL
,
window
,
window
->
doc_obj
->
nscontainer
,
&
uri
);
IUri_Release
(
iuri
);
if
(
NS_FAILED
(
nsres
))
return
E_FAIL
;
...
...
@@ -2586,22 +2594,24 @@ HRESULT create_redirect_nschannel(const WCHAR *url, nsChannel *orig_channel, nsC
HTMLWindow
*
window
=
NULL
;
nsChannel
*
channel
;
nsWineURI
*
uri
;
IUri
*
iuri
;
nsresult
nsres
;
HRESULT
hres
;
hres
=
CreateUri
(
url
,
0
,
0
,
&
iuri
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
orig_channel
->
uri
->
window_ref
)
window
=
orig_channel
->
uri
->
window_ref
->
window
;
nsres
=
create_uri
(
NULL
,
window
,
NULL
,
&
uri
);
nsres
=
create_nsuri
(
iuri
,
NULL
,
window
,
NULL
,
&
uri
);
IUri_Release
(
iuri
);
if
(
NS_FAILED
(
nsres
))
return
E_FAIL
;
hres
=
CreateUri
(
url
,
0
,
0
,
&
uri
->
uri
);
if
(
SUCCEEDED
(
hres
))
nsres
=
create_nschannel
(
uri
,
&
channel
);
sync_wine_url
(
uri
);
nsres
=
create_nschannel
(
uri
,
&
channel
);
nsIURL_Release
(
&
uri
->
nsIURL_iface
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
NS_FAILED
(
nsres
))
return
E_FAIL
;
...
...
@@ -2918,14 +2928,13 @@ static nsresult NSAPI nsIOService_NewURI(nsIIOService *iface, const nsACString *
return
nsres
;
}
nsres
=
create_uri
(
uri
,
window
,
NULL
,
&
wine_uri
);
nsres
=
create_nsuri
(
urlmon_uri
,
uri
,
window
,
NULL
,
&
wine_uri
);
IUri_Release
(
urlmon_uri
);
if
(
base_wine_uri
)
nsIURI_Release
(
&
base_wine_uri
->
nsIURL_iface
);
if
(
NS_FAILED
(
nsres
))
return
nsres
;
wine_uri
->
uri
=
urlmon_uri
;
sync_wine_url
(
wine_uri
);
*
_retval
=
(
nsIURI
*
)
wine_uri
;
return
nsres
;
...
...
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