Closed Bug 1657066 Opened 4 years ago Closed 4 years ago

Dynamic module import asserts if it encounters an uncatchable exception

Categories

(Core :: JavaScript Engine, defect, P1)

defect

Tracking

()

RESOLVED FIXED
81 Branch
Tracking Status
firefox81 --- fixed

People

(Reporter: jonco, Assigned: jonco)

References

Details

Attachments

(1 file)

The following test case results in Assertion failure: JS_IsExceptionPending(cx):

let g = newGlobal({newCompartment: true});
new Debugger(g).onExceptionUnwind = () => null;
g.eval(`import("javascript: throw 1")`);

Found while working on bug 1510598.

Blocks: 1510598
Assignee: nobody → jcoppeard
Severity: -- → S4
Priority: -- → P1

Previously this used |cx->isExceptionPending()| to determine whether the import had succeeded, which doesn't work if there was an uncatchable exception. The patch changes this to pass an explicit status.

Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d24201b6daf7
Dynamic module import doesn't handle uncatchable exceptions r=jandem
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: