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

This commit is contained in:
Jacek Caban 2007-10-09 01:21:41 +02:00 committed by Alexandre Julliard
parent 0ea0754771
commit 9a9de4d65b
1 changed files with 4 additions and 4 deletions

View File

@ -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;
}