зеркало из https://github.com/mozilla/pjs.git
Don't call DidBuildModel twice if Terminate is called twice since consumers aren't expecting it. bug 378982, r+sr=bzbarsky
This commit is contained in:
Родитель
24b27e6665
Коммит
e87c4579ff
|
@ -1038,6 +1038,12 @@ nsParser::GetRootContextKey()
|
|||
NS_IMETHODIMP
|
||||
nsParser::Terminate(void)
|
||||
{
|
||||
// We should only call DidBuildModel once, so don't do anything if this is
|
||||
// the second time that Terminate has been called.
|
||||
if (mInternalState == NS_ERROR_HTMLPARSER_STOPPARSING) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult result = NS_OK;
|
||||
// XXX - [ until we figure out a way to break parser-sink circularity ]
|
||||
// Hack - Hold a reference until we are completely done...
|
||||
|
|
Загрузка…
Ссылка в новой задаче