Jacek Caban : mshtml: Move init_nsevents call from start_binding to read_stream_data to avoid race .

Alexandre Julliard julliard at winehq.org
Tue Oct 9 13:37:47 CDT 2007


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Tue Oct  9 01:21:41 2007 +0200

mshtml: Move init_nsevents call from start_binding to read_stream_data to avoid race.

---

 dlls/mshtml/navigate.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c
index 014fcdb..659ba22 100644
--- a/dlls/mshtml/navigate.c
+++ b/dlls/mshtml/navigate.c
@@ -220,6 +220,10 @@ static HRESULT read_stream_data(BSCallback *This, IStream *stream)
                     (nsIRequest*)NSCHANNEL(This->nschannel), This->nscontext);
             if(NS_FAILED(nsres))
                 FIXME("OnStartRequest failed: %08x\n", nsres);
+
+            /* events are reset when a new document URI is loaded, so re-initialise them here */
+            if(This->doc && This->doc->nscontainer)
+                init_nsevents(This->doc->nscontainer);
         }
 
         This->readed += This->nsstream->buf_size;
@@ -819,10 +823,6 @@ HRESULT start_binding(BSCallback *bscallback)
     IMoniker_Release(bscallback->mon);
     bscallback->mon = NULL;
 
-    /* events are reset when a new document URI is loaded, so re-initialise them here */
-    if(bscallback->doc && bscallback->doc->nscontainer)
-        init_nsevents(bscallback->doc->nscontainer);
-
     return S_OK;
 }
 




More information about the wine-cvs mailing list