Skip to content

Commit

Permalink
Don't make async-from-sync iterator objects observable from user code
Browse files Browse the repository at this point in the history
Fixes #1172
  • Loading branch information
anba committed Mar 11, 2019
1 parent a09fc23 commit b4708ca
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -3355,7 +3355,7 @@ <h1>CompletePropertyDescriptor ( _Desc_ )</h1>
<p>When the abstract operation CompletePropertyDescriptor is called with Property Descriptor _Desc_, the following steps are taken:</p>
<emu-alg>
1. Assert: _Desc_ is a Property Descriptor.
1. Let _like_ be Record { [[Value]]: *undefined*, [[Writable]]: *false*, [[Get]]: *undefined*, [[Set]]: *undefined*, [[Enumerable]]: *false*, [[Configurable]]: *false* }.
1. Let _like_ be the Record { [[Value]]: *undefined*, [[Writable]]: *false*, [[Get]]: *undefined*, [[Set]]: *undefined*, [[Enumerable]]: *false*, [[Configurable]]: *false* }.
1. If IsGenericDescriptor(_Desc_) is *true* or IsDataDescriptor(_Desc_) is *true*, then
1. If _Desc_ does not have a [[Value]] field, set _Desc_.[[Value]] to _like_.[[Value]].
1. If _Desc_ does not have a [[Writable]] field, set _Desc_.[[Writable]] to _like_.[[Writable]].
Expand Down Expand Up @@ -4869,7 +4869,7 @@ <h1>GetIterator ( _obj_ [ , _hint_ [ , _method_ ] ] )</h1>
1. Let _iterator_ be ? Call(_method_, _obj_).
1. If Type(_iterator_) is not Object, throw a *TypeError* exception.
1. Let _nextMethod_ be ? GetV(_iterator_, `"next"`).
1. Let _iteratorRecord_ be Record { [[Iterator]]: _iterator_, [[NextMethod]]: _nextMethod_, [[Done]]: *false* }.
1. Let _iteratorRecord_ be the Record { [[Iterator]]: _iterator_, [[NextMethod]]: _nextMethod_, [[Done]]: *false* }.
1. Return _iteratorRecord_.
</emu-alg>
</emu-clause>
Expand Down Expand Up @@ -36845,7 +36845,9 @@ <h1>CreateAsyncFromSyncIterator ( _syncIteratorRecord_ )</h1>
<emu-alg>
1. Let _asyncIterator_ be ! ObjectCreate(%AsyncFromSyncIteratorPrototype%, &laquo; [[SyncIteratorRecord]] &raquo;).
1. Set _asyncIterator_.[[SyncIteratorRecord]] to _syncIteratorRecord_.
1. Return ? GetIterator(_asyncIterator_, ~async~).
1. Let _nextMethod_ be ! Get(_asyncIterator_, `"next"`).
1. Let _iteratorRecord_ be the Record { [[Iterator]]: _asyncIterator_, [[NextMethod]]: _nextMethod_, [[Done]]: *false* }.
1. Return _iteratorRecord_.
</emu-alg>
</emu-clause>

Expand Down

0 comments on commit b4708ca

Please sign in to comment.