Bug 1261816 - Guard against the mochitest harness finish()ing a test that already finished. r=jmaher a=test-only

MozReview-Commit-ID: 3w5xfSgJteG
This commit is contained in:
Kartikaya Gupta 2016-04-04 13:46:12 -04:00
parent 787eec4d29
commit 1a89f72413

View File

@ -1562,7 +1562,7 @@ window.onerror = function simpletestOnerror(errorMsg, url, lineNumber) {
}
}
if (!SimpleTest._stopOnLoad && !isExpected) {
if (!SimpleTest._stopOnLoad && !isExpected && !SimpleTest._alreadyFinished) {
// Need to finish() manually here, yet let the test actually end first.
SimpleTest.executeSoon(SimpleTest.finish);
}