From aacb5bc5fdf7e94af54a118d4343985e270754c9 Mon Sep 17 00:00:00 2001 From: Michael Ficarra Date: Tue, 5 Jul 2022 17:15:05 -0700 Subject: [PATCH] fixes #172: avoid exposing spec fiction %AsyncFromSyncIteratorPrototype% (#182) --- spec.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spec.html b/spec.html index 157fca4..0daedcf 100644 --- a/spec.html +++ b/spec.html @@ -309,8 +309,9 @@

AsyncIterator.prototype

AsyncIterator.from ( _O_ )

1. Let _usingIterator_ be ? GetMethod(_O_, @@asyncIterator). + 1. Let _iteratorRecord_ be *undefined*. 1. If _usingIterator_ is not *undefined*, - 1. Let _iteratorRecord_ be ? GetIterator(_O_, ~async~, _usingIterator_). + 1. Set _iteratorRecord_ to ? GetIterator(_O_, ~async~, _usingIterator_). 1. Let _hasInstance_ be ? OrdinaryHasInstance(%AsyncIterator.prototype%, _iteratorRecord_.[[Iterator]]). 1. If _hasInstance_ is *true*, then 1. Return _iteratorRecord_.[[Iterator]]. @@ -318,7 +319,7 @@

AsyncIterator.from ( _O_ )

1. Set _usingIterator_ to ? GetMethod(_O_, @@iterator). 1. If _usingIterator_ is not *undefined*, 1. Let _syncIteratorRecord_ be ? GetIterator(_O_, ~sync~, _usingIterator_). - 1. Return ! CreateAsyncFromSyncIterator(_syncIteratorRecord_). + 1. Set _iteratorRecord_ to ! CreateAsyncFromSyncIterator(_syncIteratorRecord_). 1. If _iteratorRecord_ is *undefined*, set _iteratorRecord_ to ? GetIteratorDirect(_O_). 1. Let _wrapper_ be ! ObjectCreate(%WrapForValidAsyncIteratorPrototype%, « [[AsyncIterated]] »). 1. Set _wrapper_.[[AsyncIterated]] to _iteratorRecord_.