diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 3e0c8eb1c27..21801849f17 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -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*); diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c index 29a3798ef31..b1b5609d3ee 100644 --- a/dlls/mshtml/navigate.c +++ b/dlls/mshtml/navigate.c @@ -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); diff --git a/dlls/mshtml/persist.c b/dlls/mshtml/persist.c index c48fc643b40..2f3d5cc8028 100644 --- a/dlls/mshtml/persist.c +++ b/dlls/mshtml/persist.c @@ -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; } diff --git a/dlls/mshtml/task.c b/dlls/mshtml/task.c index e612d819023..b154022ff01 100644 --- a/dlls/mshtml/task.c +++ b/dlls/mshtml/task.c @@ -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)); }