Implement notifying of rejected promises (PromiseRejectionEvent)
Categories
(Core :: DOM: Core & HTML, enhancement, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: ben.tian, Assigned: edgar)
References
(Blocks 1 open bug, )
Details
(Keywords: dev-doc-complete)
Attachments
(2 files, 1 obsolete file)
Comment 3•7 years ago
|
||
Comment 4•7 years ago
|
||
Reporter | ||
Updated•7 years ago
|
Comment 6•7 years ago
|
||
Comment 7•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 8•6 years ago
|
||
Assignee | ||
Comment 9•6 years ago
|
||
Assignee | ||
Comment 10•6 years ago
|
||
Assignee | ||
Comment 11•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 12•6 years ago
|
||
(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.
Updated•6 years ago
|
Comment 13•6 years ago
|
||
Comment 14•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a9ccbfb3293c
https://hg.mozilla.org/mozilla-central/rev/d7eaeddfd71d
Comment 17•6 years ago
•
|
||
This was already mostly documented, but I've polished things up and done the rest of the remaining bits:
- Cleaned up and improved PromiseRejectionEvent
- JavaScript Guide section Promise rejection events already exists
- All other related content reviewed and looks good.
- Added to Firefox 69 for developers
- Submitted BCD PR 44386 with changes needed there
Comment 18•6 years ago
|
||
: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
Comment 19•6 years ago
|
||
(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.
Comment 20•5 years ago
|
||
This bug is Resolved, yet I have encountered a failure of Firefox to send both the rejectionhandled and onunhandledrejection events, in accordance with its own documentation (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises, https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent). When I omit a "catch()" for a Promise that Rejects, the Web Console reports that an unhandled exception occurred. There seems to be no way to report this programming error to the user, since try/catch fails, probably due to Promise having its own try/catch. I am using the latest public Firefox, 68.0.2. (This problem is not urgent for me, I just don't think it is right that the documentation and functionality are not kept in sync with each other.)
Comment 21•5 years ago
|
||
Perhaps the Mozilla documentation (site:developer.mozilla.org/en-US/docs) is not included in github? It should be, so it can be synchronized with function and bug releases.
Comment 24•5 years ago
|
||
If there is no current reason to keep this feature as enabled only in about:config, my vote would be to complete and release these window event notifications for real so they will alert developers to missing catch() functions or missing try/catch in their Promise or Await chains.
Assignee | ||
Comment 25•5 years ago
|
||
(In reply to David Spector from comment #24)
If there is no current reason to keep this feature as enabled only in about:config, my vote would be to complete and release these window event notifications for real so they will alert developers to missing catch() functions or missing try/catch in their Promise or Await chains.
Hi David, this feature is enabled by default in bug 1525554, it should be available after 69 release. Thanks.
Description
•