Harness: Account for Symbols being thrown in async tests

It's possible for an async test to throw a Symbol (harness/async-gc.js
does this.) The Symbol ends up getting passed to $DONE in a
.then($DONE, $DONE) call. Previously, $DONE would then throw an exception
due to not being able to convert the Symbol to a string.
This commit is contained in:
Philip Chimento 2022-09-28 16:42:40 -07:00 committed by Ms2ger
parent 554a18c34d
commit 1bb7ecee5b
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ function $DONE(error) {
if(typeof error === 'object' && error !== null && 'name' in error) {
__consolePrintHandle__('Test262:AsyncTestFailure:' + error.name + ': ' + error.message);
} else {
__consolePrintHandle__('Test262:AsyncTestFailure:Test262Error: ' + error);
__consolePrintHandle__('Test262:AsyncTestFailure:Test262Error: ' + String(error));
}
} else {
__consolePrintHandle__('Test262:AsyncTestComplete');