mshtml: Use IBindCtx passed to Load in BindToStorage call.

This commit is contained in:
Jacek Caban 2007-12-24 12:48:43 +01:00 committed by Alexandre Julliard
parent d067fabd38
commit 82a199bcee
4 changed files with 14 additions and 10 deletions

View File

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

View File

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

View File

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

View File

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