Commit 553eae88 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Call set_current_mon in channelbsc_load_stream.

parent 8683b6de
......@@ -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;
......
......@@ -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);
......
......@@ -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 = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment