Jacek Caban : mshtml: Call set_current_mon in channelbsc_load_stream.
Alexandre Julliard
julliard at winehq.org
Thu Sep 26 15:44:07 CDT 2013
Module: wine
Branch: master
Commit: 553eae881bec144e733d62906664e340f9350e44
URL: http://source.winehq.org/git/wine.git/?a=commit;h=553eae881bec144e733d62906664e340f9350e44
Author: Jacek Caban <jacek at codeweavers.com>
Date: Thu Sep 26 17:34:40 2013 +0200
mshtml: Call set_current_mon in channelbsc_load_stream.
---
dlls/mshtml/binding.h | 2 +-
dlls/mshtml/navigate.c | 4 +++-
dlls/mshtml/persist.c | 10 ++++++----
3 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/dlls/mshtml/binding.h b/dlls/mshtml/binding.h
index 392713b..d953541 100644
--- a/dlls/mshtml/binding.h
+++ b/dlls/mshtml/binding.h
@@ -118,7 +118,7 @@ HRESULT navigate_new_window(HTMLOuterWindow*,IUri*,const WCHAR*,IHTMLWindow2**)
HRESULT navigate_url(HTMLOuterWindow*,const WCHAR*,IUri*,DWORD) DECLSPEC_HIDDEN;
HRESULT create_channelbsc(IMoniker*,const WCHAR*,BYTE*,DWORD,BOOL,nsChannelBSC**) DECLSPEC_HIDDEN;
-HRESULT channelbsc_load_stream(HTMLInnerWindow*,IStream*) DECLSPEC_HIDDEN;
+HRESULT channelbsc_load_stream(HTMLInnerWindow*,IMoniker*,IStream*) DECLSPEC_HIDDEN;
void channelbsc_set_channel(nsChannelBSC*,nsChannel*,nsIStreamListener*,nsISupports*) DECLSPEC_HIDDEN;
IUri *nsuri_get_uri(nsWineURI*) DECLSPEC_HIDDEN;
diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c
index 2c0666e..4e6ed61 100644
--- a/dlls/mshtml/navigate.c
+++ b/dlls/mshtml/navigate.c
@@ -1953,7 +1953,7 @@ void abort_window_bindings(HTMLInnerWindow *window)
}
}
-HRESULT channelbsc_load_stream(HTMLInnerWindow *pending_window, IStream *stream)
+HRESULT channelbsc_load_stream(HTMLInnerWindow *pending_window, IMoniker *mon, IStream *stream)
{
nsChannelBSC *bscallback = pending_window->bscallback;
HRESULT hres = S_OK;
@@ -1967,6 +1967,8 @@ HRESULT channelbsc_load_stream(HTMLInnerWindow *pending_window, IStream *stream)
if(!bscallback->nschannel->content_type)
return E_OUTOFMEMORY;
+ set_current_mon(pending_window->base.outer_window, mon, 0);
+
bscallback->bsc.window = pending_window;
if(stream)
hres = read_stream_data(bscallback, stream);
diff --git a/dlls/mshtml/persist.c b/dlls/mshtml/persist.c
index 8f36c75..8c0ad68 100644
--- a/dlls/mshtml/persist.c
+++ b/dlls/mshtml/persist.c
@@ -844,11 +844,12 @@ static HRESULT WINAPI PersistStreamInit_Load(IPersistStreamInit *iface, LPSTREAM
prepare_for_binding(This, mon, FALSE);
hres = set_moniker(This->window, mon, NULL, NULL, NULL, TRUE);
- IMoniker_Release(mon);
if(FAILED(hres))
return hres;
- return channelbsc_load_stream(This->window->pending_window, pStm);
+ hres = channelbsc_load_stream(This->window->pending_window, mon, pStm);
+ IMoniker_Release(mon);
+ return hres;
}
static HRESULT WINAPI PersistStreamInit_Save(IPersistStreamInit *iface, LPSTREAM pStm,
@@ -901,11 +902,12 @@ static HRESULT WINAPI PersistStreamInit_InitNew(IPersistStreamInit *iface)
prepare_for_binding(This, mon, FALSE);
hres = set_moniker(This->window, mon, NULL, NULL, NULL, FALSE);
- IMoniker_Release(mon);
if(FAILED(hres))
return hres;
- return channelbsc_load_stream(This->window->pending_window, NULL);
+ hres = channelbsc_load_stream(This->window->pending_window, mon, NULL);
+ IMoniker_Release(mon);
+ return hres;
}
static const IPersistStreamInitVtbl PersistStreamInitVtbl = {
More information about the wine-cvs
mailing list