Don't call DidBuildModel twice if Terminate is called twice since consumers aren't expecting it. bug 378982, r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@226741 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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...
|
||||
|
||||
Reference in New Issue
Block a user