Open
Bug 1087575
Opened 10 years ago
Updated 2 years ago
Task-based xpcshell driver breaks if a test rejects a promise with 'undefined' or 'null'
Categories
(Testing :: XPCShell Harness, defect)
Testing
XPCShell Harness
Tracking
(Not tracked)
NEW
People
(Reporter: Irving, Unassigned)
Details
An xpcshell test I was working on happened to yield on a promise, and that promise rejected with 'undefined' as its value; minimal test case:
add_task(function* yield_error() {
yield Promise.reject(undefined);
});
yield Promise.reject(null) has the same effect.
The test prints out the following and then hangs:
0:04.06 *************************
0:04.06 A coding exception was thrown in a Promise rejection callback.
0:04.06 See https://developer.mozilla.org/Mozilla/JavaScript_code_modules/Promise.jsm/Promise
0:04.06
0:04.06 Full message: TypeError: ex is undefined
0:04.06 Full stack: do_report_unexpected_exception@/Users/ireid/tbird/mozilla-central-PB/testing/xpcshell/head.js:693:3
0:04.06 run_next_test/_run_next_test/<@/Users/ireid/tbird/mozilla-central-PB/testing/xpcshell/head.js:1310:44
0:04.06 Handler.prototype.process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:868:21
0:04.06 this.PromiseWalker.walkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:744:7
0:04.06 _do_main@/Users/ireid/tbird/mozilla-central-PB/testing/xpcshell/head.js:191:5
0:04.06 _execute_test@/Users/ireid/tbird/mozilla-central-PB/testing/xpcshell/head.js:405:5
0:04.06 @-e:1:1
0:04.06
0:04.06 *************************
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•