Bug 943519 - Handle errors returned from calls to Perform; r=reviewers

This commit is contained in:
Alessio Placitelli 2013-12-19 09:09:00 -05:00
parent 6464d9eea0
commit ce111d2924

View File

@ -520,7 +520,11 @@ nsHtml5TreeOpExecutor::RunFlushLoop()
}
NS_ASSERTION(mFlushState == eInDocUpdate,
"Tried to perform tree op outside update batch.");
iter->Perform(this, &scriptElement);
nsresult rv = iter->Perform(this, &scriptElement);
if (NS_FAILED(rv)) {
MarkAsBroken(rv);
break;
}
// Be sure not to check the deadline if the last op was just performed.
if (MOZ_UNLIKELY(iter == last)) {
@ -622,7 +626,11 @@ nsHtml5TreeOpExecutor::FlushDocumentWrite()
}
NS_ASSERTION(mFlushState == eInDocUpdate,
"Tried to perform tree op outside update batch.");
iter->Perform(this, &scriptElement);
nsresult rv = iter->Perform(this, &scriptElement);
if (NS_FAILED(rv)) {
MarkAsBroken(rv);
break;
}
}
mOpQueue.Clear();