If an exception is thrown, make sure finish() still gets called as needed. r=sayrer

This commit is contained in:
bzbarsky%mit.edu 2007-01-18 19:30:38 +00:00
parent ea0e843532
commit dac64554a9

View File

@ -399,6 +399,13 @@ var oldOnError = window.onerror;
window.onerror = function (ev) {
is(0, 1, "Error thrown during test: " + ev);
if (oldOnError) {
oldOnError(ev);
try {
oldOnError(ev);
} catch (e) {
}
}
if (SimpleTest._stopOnLoad == false) {
// Need to finish() manually here
SimpleTest.finish();
}
}