Commit 82a199bc authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Use IBindCtx passed to Load in BindToStorage call.

parent d067fabd
......@@ -425,7 +425,7 @@ void init_nsevents(NSContainer*);
nsresult get_nsinterface(nsISupports*,REFIID,void**);
BSCallback *create_bscallback(IMoniker*);
HRESULT start_binding(HTMLDocument*,BSCallback*);
HRESULT start_binding(HTMLDocument*,BSCallback*,IBindCtx*);
HRESULT load_stream(BSCallback*,IStream*);
void set_document_bscallback(HTMLDocument*,BSCallback*);
void set_current_mon(HTMLDocument*,IMoniker*);
......
......@@ -829,20 +829,24 @@ void hlink_frame_navigate(HTMLDocument *doc, IHlinkFrame *hlink_frame,
IBindStatusCallback_Release(STATUSCLB(callback));
}
HRESULT start_binding(HTMLDocument *doc, BSCallback *bscallback)
HRESULT start_binding(HTMLDocument *doc, BSCallback *bscallback, IBindCtx *bctx)
{
IStream *str = NULL;
IBindCtx *bctx;
HRESULT hres;
bscallback->doc = doc;
call_docview_84(bscallback->doc);
hres = CreateAsyncBindCtx(0, STATUSCLB(bscallback), NULL, &bctx);
if(FAILED(hres)) {
WARN("CreateAsyncBindCtx failed: %08x\n", hres);
on_stop_nsrequest(bscallback);
return hres;
if(bctx) {
RegisterBindStatusCallback(bctx, STATUSCLB(bscallback), NULL, 0);
IBindCtx_AddRef(bctx);
}else {
hres = CreateAsyncBindCtx(0, STATUSCLB(bscallback), NULL, &bctx);
if(FAILED(hres)) {
WARN("CreateAsyncBindCtx failed: %08x\n", hres);
on_stop_nsrequest(bscallback);
return hres;
}
}
hres = IMoniker_BindToStorage(bscallback->mon, bctx, NULL, &IID_IStream, (void**)&str);
......
......@@ -429,7 +429,7 @@ static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAva
return hres;
if(!bind_complete)
return start_binding(This, This->bscallback);
return start_binding(This, This->bscallback, pibc);
return S_OK;
}
......
......@@ -214,7 +214,7 @@ static void set_progress(HTMLDocument *doc)
static void task_start_binding(HTMLDocument *doc, BSCallback *bscallback)
{
if(doc)
start_binding(doc, bscallback);
start_binding(doc, bscallback, NULL);
IBindStatusCallback_Release(STATUSCLB(bscallback));
}
......
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