Jacek Caban : mshtml:
Make sure we have associated listener before calling OnStopRequest.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Jul 26 06:37:08 CDT 2007
Module: wine
Branch: master
Commit: cb9527ac069dcbc27ad8d27f8637795c00e77b76
URL: http://source.winehq.org/git/wine.git/?a=commit;h=cb9527ac069dcbc27ad8d27f8637795c00e77b76
Author: Jacek Caban <jacek at codeweavers.com>
Date: Thu Jul 26 00:14:45 2007 +0200
mshtml: Make sure we have associated listener before calling OnStopRequest.
---
dlls/mshtml/navigate.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c
index 76fd5f2..014fcdb 100644
--- a/dlls/mshtml/navigate.c
+++ b/dlls/mshtml/navigate.c
@@ -249,6 +249,12 @@ static void add_nsrequest(BSCallback *This)
}
}
+static void on_stop_nsrequest(BSCallback *This) {
+ if(This->nslistener)
+ nsIStreamListener_OnStopRequest(This->nslistener, (nsIRequest*)NSCHANNEL(This->nschannel),
+ This->nscontext, NS_OK);
+}
+
#define STATUSCLB_THIS(iface) DEFINE_THIS(BSCallback, BindStatusCallback, iface)
static HRESULT WINAPI BindStatusCallback_QueryInterface(IBindStatusCallback *iface,
@@ -391,10 +397,9 @@ static HRESULT WINAPI BindStatusCallback_OnStopBinding(IBindStatusCallback *ifac
This->binding = NULL;
}
- if(This->nslistener) {
- nsIStreamListener_OnStopRequest(This->nslistener, (nsIRequest*)NSCHANNEL(This->nschannel),
- This->nscontext, NS_OK);
+ on_stop_nsrequest(This);
+ if(This->nslistener) {
if(This->nschannel->load_group) {
nsresult nsres;
@@ -796,8 +801,7 @@ HRESULT start_binding(BSCallback *bscallback)
hres = CreateAsyncBindCtx(0, STATUSCLB(bscallback), NULL, &bctx);
if(FAILED(hres)) {
WARN("CreateAsyncBindCtx failed: %08x\n", hres);
- nsIStreamListener_OnStopRequest(bscallback->nslistener, (nsIRequest*)NSCHANNEL(bscallback->nschannel),
- bscallback->nscontext, NS_OK);
+ on_stop_nsrequest(bscallback);
return hres;
}
@@ -805,8 +809,7 @@ HRESULT start_binding(BSCallback *bscallback)
IBindCtx_Release(bctx);
if(FAILED(hres)) {
WARN("BindToStorage failed: %08x\n", hres);
- nsIStreamListener_OnStopRequest(bscallback->nslistener, (nsIRequest*)NSCHANNEL(bscallback->nschannel),
- bscallback->nscontext, NS_OK);
+ on_stop_nsrequest(bscallback);
return hres;
}
More information about the wine-cvs
mailing list