diff --git a/spec.html b/spec.html index 507111a5d2..cd55a9e9ce 100644 --- a/spec.html +++ b/spec.html @@ -38899,20 +38899,23 @@

The %AsyncFromSyncIteratorPrototype% Object

-

%AsyncFromSyncIteratorPrototype%.next ( _value_ )

+

%AsyncFromSyncIteratorPrototype%.next ( [ _value_ ] )

1. Let _O_ be the *this* value. 1. Assert: Type(_O_) is Object and _O_ has a [[SyncIteratorRecord]] internal slot. 1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%). 1. Let _syncIteratorRecord_ be _O_.[[SyncIteratorRecord]]. - 1. Let _result_ be IteratorNext(_syncIteratorRecord_, _value_). + 1. If _value_ is present, then + 1. Let _result_ be IteratorNext(_syncIteratorRecord_, _value_). + 1. Else, + 1. Let _result_ be IteratorNext(_syncIteratorRecord_). 1. IfAbruptRejectPromise(_result_, _promiseCapability_). 1. Return ! AsyncFromSyncIteratorContinuation(_result_, _promiseCapability_).
-

%AsyncFromSyncIteratorPrototype%.return ( _value_ )

+

%AsyncFromSyncIteratorPrototype%.return ( [ _value_ ] )

1. Let _O_ be the *this* value. @@ -38925,7 +38928,10 @@

%AsyncFromSyncIteratorPrototype%.return ( _value_ )

1. Let _iterResult_ be ! CreateIterResultObject(_value_, *true*). 1. Perform ! Call(_promiseCapability_.[[Resolve]], *undefined*, « _iterResult_ »). 1. Return _promiseCapability_.[[Promise]]. - 1. Let _result_ be Call(_return_, _syncIterator_, « _value_ »). + 1. If _value_ is present, then + 1. Let _result_ be Call(_return_, _syncIterator_, « _value_ »). + 1. Else, + 1. Let _result_ be Call(_return_, _syncIterator_). 1. IfAbruptRejectPromise(_result_, _promiseCapability_). 1. If Type(_result_) is not Object, then 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « a newly created *TypeError* object »). @@ -38935,7 +38941,8 @@

%AsyncFromSyncIteratorPrototype%.return ( _value_ )

-

%AsyncFromSyncIteratorPrototype%.throw ( _value_ )

+

%AsyncFromSyncIteratorPrototype%.throw ( [ _value_ ] )

+ In this specification, _value_ is always provided, but is left optional for consistency with . 1. Let _O_ be the *this* value. @@ -38947,7 +38954,10 @@

%AsyncFromSyncIteratorPrototype%.throw ( _value_ )

1. If _throw_ is *undefined*, then 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « _value_ »). 1. Return _promiseCapability_.[[Promise]]. - 1. Let _result_ be Call(_throw_, _syncIterator_, « _value_ »). + 1. If _value_ is present, then + 1. Let _result_ be Call(_throw_, _syncIterator_, « _value_ »). + 1. Else, + 1. Let _result_ be Call(_throw_, _syncIterator_). 1. IfAbruptRejectPromise(_result_, _promiseCapability_). 1. If Type(_result_) is not Object, then 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « a newly created *TypeError* object »).