Jacek Caban : mshtml: Correctly handle nsILoadGroup.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Aug 16 06:15:50 CDT 2006
Module: wine
Branch: master
Commit: 9ee2f5e0adf0ce87db5e40f93f703e46cb4d7c47
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=9ee2f5e0adf0ce87db5e40f93f703e46cb4d7c47
Author: Jacek Caban <jacek at codeweavers.com>
Date: Tue Aug 15 21:55:33 2006 +0200
mshtml: Correctly handle nsILoadGroup.
---
dlls/mshtml/navigate.c | 12 +++++++++++-
dlls/mshtml/nsio.c | 19 ++++++++++++++++++-
2 files changed, 29 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c
index c37c475..c588f05 100644
--- a/dlls/mshtml/navigate.c
+++ b/dlls/mshtml/navigate.c
@@ -309,10 +309,20 @@ static HRESULT WINAPI BindStatusCallback
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;
}
diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c
index 0c26fd4..d643e35 100644
--- a/dlls/mshtml/nsio.c
+++ b/dlls/mshtml/nsio.c
@@ -602,8 +602,17 @@ static nsresult NSAPI nsChannel_AsyncOpe
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_AsyncOpe
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));
More information about the wine-cvs
mailing list