mshtml: Call set_current_mon in channelbsc_load_stream.

This commit is contained in:
Jacek Caban 2013-09-26 17:34:40 +02:00 committed by Alexandre Julliard
parent 8683b6dee5
commit 553eae881b
3 changed files with 10 additions and 6 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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 = {