tc39 / proposal-shadowrealm

ECMAScript Proposal, specs, and reference implementation for Realms
https://tc39.es/proposal-shadowrealm/
1.43k stars 67 forks source link

Editorial: fix #371 - better handling of completion values #373

Closed caridy closed 2 years ago

caridy commented 2 years ago

cc @linusg

linusg commented 2 years ago

In case it is helpful, what I did in my implementation to work around the spec bug is simply Return result.:

https://github.com/SerenityOS/serenity/blob/dfb7588d300148ec72e1283947c4b37d71ffc460/Userland/Libraries/LibJS/Runtime/WrappedFunction.cpp#L75-L79

I was assuming that:

This implementation of ShadowRealm passes all 64 tests currently present in test262: https://libjs.dev/test262/per-file/?path=test/built-ins/ShadowRealm

So in case the desired behaviour is something else, that is currently not covered by tests (or unobservable).

leobalter commented 2 years ago

@rwaldron PTAL at the referred test262.