Closed Bug 1091091 Opened 10 years ago Closed 10 years ago

Support ErrorResult in Promise::MaybeReject()

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla36

People

(Reporter: bkelly, Assigned: bkelly)

Details

Attachments

(1 file)

Currently the only easy way to reject a promise with an ErrorResult is to let the binding code do it for you.  Its not as simple as passing the error code from the ErrorResult into the promise because type errors need special handling.

I need this for the Cache API, so I will get it working on maple first.
Comment on attachment 8513734 [details] [diff] [review]
Support ErrorResult in Promise::MaybeReject()

Please document in ToJSValue.h that only a failed ErrorResult should be passed in?

r=me
Attachment #8513734 - Flags: review?(bzbarsky) → review+
https://hg.mozilla.org/mozilla-central/rev/12bba4eb1cef
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: