Jacek Caban : mshtml: Move AddRequest call to OnStartBinding.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Feb 12 09:23:49 CST 2007


Module: wine
Branch: master
Commit: 48b445b80d218248d5e586bcf32aa11829053e9b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=48b445b80d218248d5e586bcf32aa11829053e9b

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Fri Feb  9 20:20:43 2007 +0100

mshtml: Move AddRequest call to OnStartBinding.

---

 dlls/mshtml/navigate.c |    8 ++++++++
 dlls/mshtml/nsio.c     |   18 +-----------------
 2 files changed, 9 insertions(+), 17 deletions(-)

diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c
index 3706f2f..a665ff0 100644
--- a/dlls/mshtml/navigate.c
+++ b/dlls/mshtml/navigate.c
@@ -267,6 +267,14 @@ static HRESULT WINAPI BindStatusCallback
     IBinding_AddRef(pbind);
     This->binding = pbind;
 
+    if(This->nschannel && This->nschannel->load_group) {
+        nsresult nsres = nsILoadGroup_AddRequest(This->nschannel->load_group,
+                (nsIRequest*)NSCHANNEL(This->nschannel), This->nscontext);
+
+        if(NS_FAILED(nsres))
+            ERR("AddRequest failed:%08x\n", nsres);
+    }
+
     return S_OK;
 }
 
diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c
index b075b7b..1d1ec90 100644
--- a/dlls/mshtml/nsio.c
+++ b/dlls/mshtml/nsio.c
@@ -634,16 +634,8 @@ static nsresult NSAPI nsChannel_AsyncOpe
 
             nsIWebBrowserChrome_Release(NSWBCHROME(container));
 
-            if(do_load_from_moniker_hack(This)) {
-                if(This->load_group) {
-                    nsres = nsILoadGroup_AddRequest(This->load_group,
-                                                    (nsIRequest*)NSCHANNEL(This), NULL);
-
-                    if(NS_FAILED(nsres))
-                        ERR("AddRequest failed:%08x\n", nsres);
-                }
+            if(do_load_from_moniker_hack(This))
                 return WINE_NS_LOAD_FROM_MONIKER;
-            }
         }else if(container->doc) {
             BOOL cont = before_async_open(This, container);
             nsIWebBrowserChrome_Release(NSWBCHROME(container));
@@ -726,14 +718,6 @@ 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:%08x\n", nsres);
-    }
-
     start_binding(bscallback);
     IBindStatusCallback_Release(STATUSCLB(bscallback));
 




More information about the wine-cvs mailing list