Closed Bug 1748888 Opened 2 years ago Closed 2 years ago

PromiseNativeHandler::[Resolved,Rejected]Callback needs a way to indicate failures

Categories

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

task

Tracking

()

RESOLVED FIXED
98 Branch
Tracking Status
firefox98 --- fixed

People

(Reporter: evilpie, Assigned: mgaudet)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 2 obsolete files)

Right now the ResolvedCallback/RejectedCallback methods don't return bool or have a ErrorResult parameter. We need either of those to be able to propagate failures from the streams code implementation of those callbacks.

Blocks: dom-streams

I just realized that this needs to block shipping. We now call MaybeSetPendingException in various Callback methods. This means we can have a pending exception, but return true in a JS Native: https://searchfox.org/mozilla-central/source/dom/promise/Promise.cpp#345. This is an invalid state and might cause assertions.

Blocks: 1735656
No longer blocks: dom-streams

This doesn't link however, as it's complaining about an undefined vtable for
FalliblePromiseNativeHandler... I suspect some confusion about how nsIsupports
is connected here

Assignee: nobody → mgaudet
Attachment #9259812 - Attachment description: WIP: Bug 1748888 - Add ErrorResult parameter to PromiseNativeHandler callbacks → Bug 1748888 - Add ErrorResult parameter to PromiseNativeHandler callbacks r?smaug
Status: NEW → ASSIGNED
Pushed by mgaudet@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/24818df95358
Add ErrorResult parameter to PromiseNativeHandler callbacks r=smaug
Attachment #9259784 - Attachment is obsolete: true
Attachment #9259783 - Attachment is obsolete: true
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: