Closed Bug 1253371 Opened 4 years ago Closed 4 years ago

Figure out what to do with Promises and uncatchable exceptions

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: khuey, Assigned: khuey)

Details

(Whiteboard: [Comment 4 is about bug 1253370] btpp-fixlater)

Consider

var p = new Promise(function(resolve, reject) {
  while (1);
});

When the user aborts the iloop via the slow script dialog, we throw an uncatchable exception.  For any other exception we would reject the promise with that exception, but rejecting a Promise with an uncatchable exception is more than a little bit nonsense.
My gut feeling is we should rethrow the uncatchable exception out of the Promise ctor in this situation, fwiw.
And for then callbacks probably just neither resolve nor reject the next promise.
Whiteboard: btpp-fixlater
Implemented in bug 1252268.
Assignee: nobody → khuey
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Lars, I assume you mistyped the bug# in your commit?  Mind putting the right bug# in the whiteboard here?
Flags: needinfo?(lhansen)
Bug 1253370
Flags: needinfo?(lhansen)
Whiteboard: btpp-fixlater → [Comment 4 is about bug 1253370] btpp-fixlater
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.