Module: wine Branch: master Commit: f7b8eccd5f3fc8cf51a4a534b69435337f051ed9 URL: http://source.winehq.org/git/wine.git/?a=commit;h=f7b8eccd5f3fc8cf51a4a534b6...
Author: Jacek Caban jacek@codeweavers.com Date: Thu Jun 23 13:45:18 2011 +0200
mshtml: Use CreateURLMonikerEx2 for creating URL moniker.
---
dlls/mshtml/nsio.c | 56 +++++++++++++++++++++++++++------------------------ 1 files changed, 30 insertions(+), 26 deletions(-)
diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index b97dbe4..9473754 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -69,6 +69,32 @@ struct nsWineURI { BOOL is_doc_uri; };
+static BOOL ensure_uri(nsWineURI *This) +{ + HRESULT hres; + + if(This->uri) + return TRUE; + + if(This->uri_builder) { + hres = IUriBuilder_CreateUriSimple(This->uri_builder, 0, 0, &This->uri); + if(FAILED(hres)) { + WARN("CreateUriSimple failed: %08x\n", hres); + return FALSE; + } + + return TRUE; + } + + hres = CreateUri(This->wine_url, 0, 0, &This->uri); + if(FAILED(hres)) { + WARN("CreateUri failed: %08x\n", hres); + return FALSE; + } + + return TRUE; +} + static nsresult create_uri(nsIURI*,HTMLWindow*,NSContainer*,nsWineURI**);
static const char *debugstr_nsacstr(const nsACString *nsstr) @@ -886,7 +912,7 @@ static nsresult async_open(nsChannel *This, HTMLWindow *window, BOOL is_doc_chan IMoniker *mon = NULL; HRESULT hres;
- hres = CreateURLMoniker(NULL, This->uri->wine_url, &mon); + hres = CreateURLMonikerEx2(NULL, This->uri->uri, &mon, 0); if(FAILED(hres)) { WARN("CreateURLMoniker failed: %08x\n", hres); return NS_ERROR_UNEXPECTED; @@ -927,6 +953,9 @@ static nsresult NSAPI nsChannel_AsyncOpen(nsIHttpChannel *iface, nsIStreamListen
TRACE("(%p)->(%p %p) opening %s\n", This, aListener, aContext, debugstr_w(This->uri->wine_url));
+ if(!ensure_uri(This->uri)) + return NS_ERROR_FAILURE; + if(This->uri->is_doc_uri) { window = get_channel_window(This); if(window) { @@ -1500,31 +1529,6 @@ static const nsIHttpChannelInternalVtbl nsHttpChannelInternalVtbl = { nsHttpChannelInternal_SetChannelIsForDownload };
-static BOOL ensure_uri(nsWineURI *This) -{ - HRESULT hres; - - if(This->uri) - return TRUE; - - if(This->uri_builder) { - hres = IUriBuilder_CreateUriSimple(This->uri_builder, 0, 0, &This->uri); - if(FAILED(hres)) { - WARN("CreateUriSimple failed: %08x\n", hres); - return FALSE; - } - - return TRUE; - } - - hres = CreateUri(This->wine_url, 0, 0, &This->uri); - if(FAILED(hres)) { - WARN("CreateUri failed: %08x\n", hres); - return FALSE; - } - - return TRUE; -}
static void invalidate_uri(nsWineURI *This) {