mshtml: Correctly handle nsILoadGroup.
This commit is contained in:
parent
498b781e23
commit
9ee2f5e0ad
|
@ -309,10 +309,20 @@ static HRESULT WINAPI BindStatusCallback_OnStopBinding(IBindStatusCallback *ifac
|
||||||
|
|
||||||
TRACE("(%p)->(%08lx %s)\n", This, hresult, debugstr_w(szError));
|
TRACE("(%p)->(%08lx %s)\n", This, hresult, debugstr_w(szError));
|
||||||
|
|
||||||
if(This->nslistener)
|
if(This->nslistener) {
|
||||||
nsIStreamListener_OnStopRequest(This->nslistener, (nsIRequest*)NSCHANNEL(This->nschannel),
|
nsIStreamListener_OnStopRequest(This->nslistener, (nsIRequest*)NSCHANNEL(This->nschannel),
|
||||||
This->nscontext, NS_OK);
|
This->nscontext, NS_OK);
|
||||||
|
|
||||||
|
if(This->nschannel->load_group) {
|
||||||
|
nsresult nsres;
|
||||||
|
|
||||||
|
nsres = nsILoadGroup_RemoveRequest(This->nschannel->load_group,
|
||||||
|
(nsIRequest*)NSCHANNEL(This->nschannel), NULL, NS_OK);
|
||||||
|
if(NS_FAILED(nsres))
|
||||||
|
ERR("RemoveRequest failed: %08lx\n", nsres);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -602,8 +602,17 @@ static nsresult NSAPI nsChannel_AsyncOpen(nsIHttpChannel *iface, nsIStreamListen
|
||||||
|
|
||||||
nsIWebBrowserChrome_Release(NSWBCHROME(container));
|
nsIWebBrowserChrome_Release(NSWBCHROME(container));
|
||||||
|
|
||||||
if(!This->channel)
|
if(!This->channel) {
|
||||||
|
if(This->load_group) {
|
||||||
|
nsres = nsILoadGroup_AddRequest(This->load_group,
|
||||||
|
(nsIRequest*)NSCHANNEL(This), NULL);
|
||||||
|
|
||||||
|
if(NS_FAILED(nsres))
|
||||||
|
ERR("AddRequest failed:%08lx\n", nsres);
|
||||||
|
}
|
||||||
|
|
||||||
return WINE_NS_LOAD_FROM_MONIKER;
|
return WINE_NS_LOAD_FROM_MONIKER;
|
||||||
|
}
|
||||||
}else {
|
}else {
|
||||||
BOOL cont = before_async_open(This, container);
|
BOOL cont = before_async_open(This, container);
|
||||||
nsIWebBrowserChrome_Release(NSWBCHROME(container));
|
nsIWebBrowserChrome_Release(NSWBCHROME(container));
|
||||||
|
@ -673,6 +682,14 @@ static nsresult NSAPI nsChannel_AsyncOpen(nsIHttpChannel *iface, nsIStreamListen
|
||||||
bscallback->nscontext = aContext;
|
bscallback->nscontext = aContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(This->load_group) {
|
||||||
|
nsres = nsILoadGroup_AddRequest(This->load_group,
|
||||||
|
(nsIRequest*)NSCHANNEL(This), NULL);
|
||||||
|
|
||||||
|
if(NS_FAILED(nsres))
|
||||||
|
ERR("AddRequest failed:%08lx\n", nsres);
|
||||||
|
}
|
||||||
|
|
||||||
start_binding(bscallback);
|
start_binding(bscallback);
|
||||||
IBindStatusCallback_Release(STATUSCLB(bscallback));
|
IBindStatusCallback_Release(STATUSCLB(bscallback));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue