WebIDL code generation for Promise returning callbacks doesn't handle abrupt completions correctly.
Categories
(Core :: DOM: Bindings (WebIDL), defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox94 | --- | fixed |
People
(Reporter: mgaudet, Assigned: peterv)
References
Details
Attachments
(2 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
13.26 KB,
patch
|
Details | Diff | Splinter Review |
Our Promise-returning callback interfaces (callback Foo = Promise<...>()
) don't correctly handle abrupt completions
The WebIDL spec for callback invoke has as Step 15.5 and 15.6 returning a promise rejected with the error; however, it appears that we instead simply return nullptr and note the exception on the return value.
There's only one in-tree consumer of a Promise returning callback: LockGrantedCallback
which has a special helper to handle this.
Reporter | ||
Comment 1•4 years ago
|
||
I spent more than a few hours trying to get something working; alas, every approach I've taken has been thwarted so far. Can share in progress code if there's interest.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
Assignee | ||
Comment 3•4 years ago
|
||
Assignee | ||
Comment 4•4 years ago
|
||
Note that even with this, there are cases where creating the promise for the return value fails. So I think the LockGrantedCallback helper might need to stay.
Thanks, I guess I can resolve bug 1726363 as a dupe of this?
Comment 8•4 years ago
|
||
bugherder |
Description
•