Implement notifying of rejected promises (PromiseRejectionEvent)

RESOLVED FIXED in Firefox 68

Status

()

enhancement
P2
normal
RESOLVED FIXED
2 years ago
17 days ago

People

(Reporter: ben.tian, Assigned: edgar)

Tracking

({dev-doc-complete})

unspecified
mozilla68
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox68 fixed)

Details

()

Attachments

(2 attachments, 1 obsolete attachment)

This bug is to
1) implement notifying of rejected promises per HTML spec [1] and fire PromiseRejectionEvent [2], and
2) enable PromiseRejectionEvent interface implemented in bug 1338059.

Note bug 1338059 implements PromiseRejectionEvent interface but disables it until we actually fire the events.


[1] Section 8.1.3.12 Unhandled promise rejections 
https://html.spec.whatwg.org/multipage/webappapis.html#unhandled-promise-rejections
[2] https://html.spec.whatwg.org/multipage/webappapis.html#promiserejectionevent
Ben, are you planning to continue working on this?
Priority: -- → P2
Sure. Take this bug.
Assignee: nobody → btian
Added DDN keyword for tracking for doc purposes. Also added "PromiseRejectionEvent" to the summary to help make this bug easier to find using a quick search.
Keywords: dev-doc-needed
Summary: Implement notifying of rejected promises → Implement notifying of rejected promises (PromiseRejectionEvent)
ni? :overholt to prioritize this given the new information we have on usage.
Flags: needinfo?(overholt)
On our list :)
Flags: needinfo?(overholt)
Assignee: ben.tian → nobody
Note that this could cause bogus successes in tests, given testharness.js (by default) is meant to fail if there's unhandled rejections.
unhandledrejection lands in Servo at https://github.com/servo/servo/pull/20755
Assignee: nobody → echen
Attachment #9040755 - Attachment is obsolete: true

(In reply to Edgar Chen [:edgar] from comment #10)

Created attachment 9040755 [details]
Bug 1362272 - Part 3: Enable on nightly and update tests;

I am going to do this in a separated bug.

Component: DOM → DOM: Core & HTML
Pushed by echen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a9ccbfb3293c
Part 1: Add onrejectionhandled and onunhandledrejection EventHandler; r=smaug
https://hg.mozilla.org/integration/autoland/rev/d7eaeddfd71d
Part 2: Implement notifying of rejected promises; r=smaug
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/16869 for changes under testing/web-platform/tests
Upstream PR merged

This was already mostly documented, but I've polished things up and done the rest of the remaining bits:

:sheppy and others, are you sure Firefox 68 is or will be correct and not 69?

Via https://github.com/Fyrd/caniuse/pull/4972 and https://tests.caniuse.com/?feat=unhandledrejection leading to the comparison: https://i.imgur.com/2Iphqre.png

(In reply to kai.hollberg from comment #18)

:sheppy and others, are you sure Firefox 68 is or will be correct and not 69?

Via https://github.com/Fyrd/caniuse/pull/4972 and https://tests.caniuse.com/?feat=unhandledrejection leading to the comparison: https://i.imgur.com/2Iphqre.png

The implementation landed in 68 in this bug. We enabled it from 69 in bug 1525554 instead.

You need to log in before you can comment on or make changes to this bug.