Closed Bug 1534392 Opened 5 years ago Closed 5 years ago

Make %AsyncFromSyncIteratorPrototype% methods return a rejected promise, not throw, when PromiseResolve throws

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: jorendorff, Assigned: jorendorff)

Details

Attachments

(2 files)

:anba reported this spec bug as tc39/ecma262 issue #1461; the spec fix is PR 1470.

We need to implement that.

The new steps are official since https://github.com/tc39/ecma262/pull/1250
landed. (Some of these step numbers change again in the next commit.)

This makes %AsyncFromSyncIteratorPrototype%.next/return/throw return a rejected
promise, not throw, when PromiseResolve throws, following the usual convention
for methods that return promises. This follows proposed spec change
https://github.com/tc39/ecma262/pull/1470, which I expect will land with
little controversy.

Depends on D23029

Pushed by jorendorff@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/47e570e51385
Part 1: Update step numbers in comments to match current draft spec. r=anba
Pushed by jorendorff@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/99a6973af7ab
Part 2: Fix error handling in %AsyncFromSyncIteratorPrototype% methods. r=anba
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Flags: needinfo?(jorendorff)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: