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

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

parent 0ea07547
......@@ -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;
}
......
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