You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the sync iterator-helpers shim, it correctly finds and enhances the existing IteratorPrototype if there.
However, for the async-iterator-helpers shim, it does not succeed at finding the existing one. It therefore makes its own, rather than enhancing the existing one.
This bug causes the SES shim to fail to initialize during lockdown with
TypeError('Conflicting bindings of %AsyncIteratorPrototype%')
import'core-js/actual/iterator/index.js';import'core-js/actual/async-iterator/index.js';const{ getPrototypeOf }=Object;// /////////////////////////////////////////////////////////////////// See that the synchronous case works, i.e., that it reuses the// existing IteratorPrototype if there is one.// Normal JS that also works without core-jsconstArrayIterator=[][Symbol.iterator]();constArrayIteratorPrototype=getPrototypeOf(ArrayIterator);// This is the real one.constIteratorPrototype=getPrototypeOf(ArrayIteratorPrototype);// End normal JSconsole.log(Iterator.prototype===IteratorPrototype);// Should return true, and does// /////////////////////////////////////////////////////////////////// See that the asynchronous case does not reuse the existing// AsyncIteratorPrototype if there is one.// Normal JS that also works without core-jsasyncfunction*AsyncGeneratorFunctionInstance(){}constAsyncGeneratorFunction=getPrototypeOf(AsyncGeneratorFunctionInstance,).constructor;constAsyncGenerator=AsyncGeneratorFunction.prototype;constAsyncGeneratorPrototype=AsyncGenerator.prototype;// This is the real one.constAsyncIteratorPrototype=getPrototypeOf(AsyncGeneratorPrototype);// End normal JSconsole.log(AsyncIterator.prototype===AsyncIteratorPrototype);// Should return true, but does return false
The text was updated successfully, but these errors were encountered:
erights
changed the title
The async-iterator-helpers makes its own AsyncIteratorPrototype rather that enhancing the real one.
The async-iterator-helpers shim makes its own AsyncIteratorPrototype rather that enhancing the real one.
Jul 6, 2023
For the sync iterator-helpers shim, it correctly finds and enhances the existing IteratorPrototype if there.
However, for the async-iterator-helpers shim, it does not succeed at finding the existing one. It therefore makes its own, rather than enhancing the existing one.
This bug causes the SES shim to fail to initialize during
lockdown
with(Thus SES does correctly fails safe.) See endojs/endo#1655 (comment)
The text was updated successfully, but these errors were encountered: