зеркало из https://github.com/mozilla/gecko-dev.git
Don't unblock onload on the document if we no longer have a parser. Bug375051, r=mbkap, sr=sicking
This commit is contained in:
Родитель
bb11c49afb
Коммит
b93abe4bf4
|
@ -1350,6 +1350,11 @@ nsContentSink::DidBuildModelImpl(void)
|
||||||
void
|
void
|
||||||
nsContentSink::DropParserAndPerfHint(void)
|
nsContentSink::DropParserAndPerfHint(void)
|
||||||
{
|
{
|
||||||
|
if (!mParser) {
|
||||||
|
// Make sure we don't unblock unload too many times
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Ref. Bug 49115
|
// Ref. Bug 49115
|
||||||
// Do this hack to make sure that the parser
|
// Do this hack to make sure that the parser
|
||||||
// doesn't get destroyed, accidently, before
|
// doesn't get destroyed, accidently, before
|
||||||
|
|
|
@ -1872,6 +1872,7 @@ HTMLContentSink::DidBuildModel(void)
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
HTMLContentSink::SetParser(nsIParser* aParser)
|
HTMLContentSink::SetParser(nsIParser* aParser)
|
||||||
{
|
{
|
||||||
|
NS_PRECONDITION(aParser, "Should have a parser here!");
|
||||||
mParser = aParser;
|
mParser = aParser;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -449,6 +449,7 @@ nsXMLContentSink::WillResume(void)
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsXMLContentSink::SetParser(nsIParser* aParser)
|
nsXMLContentSink::SetParser(nsIParser* aParser)
|
||||||
{
|
{
|
||||||
|
NS_PRECONDITION(aParser, "Should have a parser here!");
|
||||||
mParser = aParser;
|
mParser = aParser;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче