Backout changeset 3d64bdd31c15 (bug 1333333) for causing bug 1367067, bug 1367085 and bug 1367330.

MozReview-Commit-ID: E7Q3LQDXgIA
This commit is contained in:
Henri Sivonen
2017-05-24 11:35:33 +03:00
parent 6150262c2a
commit 62b1a36ca4
8 changed files with 523 additions and 377 deletions

View File

@@ -238,14 +238,9 @@ nsHtml5TreeOpExecutor::MarkAsBroken(nsresult aReason)
// We are under memory pressure, but let's hope the following allocation
// works out so that we get to terminate and clean up the parser from
// a safer point.
if (mParser && mDocument) { // can mParser ever be null here?
nsCOMPtr<nsIRunnable> terminator =
NewRunnableMethod(GetParser(), &nsHtml5Parser::Terminate);
if (NS_FAILED(mDocument->Dispatch("nsHtml5Parser::Terminate",
TaskCategory::Network,
terminator.forget()))) {
NS_WARNING("failed to dispatch executor flush event");
}
if (mParser) { // can mParser ever be null here?
MOZ_ALWAYS_SUCCEEDS(
NS_DispatchToMainThread(NewRunnableMethod(GetParser(), &nsHtml5Parser::Terminate)));
}
return aReason;
}
@@ -269,9 +264,9 @@ void
nsHtml5TreeOpExecutor::ContinueInterruptedParsingAsync()
{
if (!mDocument || !mDocument->IsInBackgroundWindow()) {
nsCOMPtr<nsIRunnable> flusher = new nsHtml5ExecutorReflusher(this);
nsCOMPtr<nsIRunnable> flusher = new nsHtml5ExecutorReflusher(this);
if (NS_FAILED(mDocument->Dispatch("nsHtml5ExecutorReflusher",
TaskCategory::Network,
TaskCategory::Other,
flusher.forget()))) {
NS_WARNING("failed to dispatch executor flush event");
}