Commit 9ee2f5e0 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Correctly handle nsILoadGroup.

parent 498b781e
......@@ -309,10 +309,20 @@ static HRESULT WINAPI BindStatusCallback_OnStopBinding(IBindStatusCallback *ifac
TRACE("(%p)->(%08lx %s)\n", This, hresult, debugstr_w(szError));
if(This->nslistener)
if(This->nslistener) {
nsIStreamListener_OnStopRequest(This->nslistener, (nsIRequest*)NSCHANNEL(This->nschannel),
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;
}
......
......@@ -602,8 +602,17 @@ static nsresult NSAPI nsChannel_AsyncOpen(nsIHttpChannel *iface, nsIStreamListen
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;
}
}else {
BOOL cont = before_async_open(This, container);
nsIWebBrowserChrome_Release(NSWBCHROME(container));
......@@ -673,6 +682,14 @@ static nsresult NSAPI nsChannel_AsyncOpen(nsIHttpChannel *iface, nsIStreamListen
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);
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