-
Hi, Am trying to evaluate some code inside a Compartment inside QuickJS(-NG) inside quickjs-emscripten in WASM in NodeJS and a basis
Tried with both QuickJS and QuickJS0NG, same error. And I'm 'loading' SES by evalling ./node_modules/ses/dist/ses.umd.js inside QuickJS These are the environment details: Any thoughts? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
That stack is showing that QuickJS is failing to parse some dynamically generated code in the core SES evaluator used by compartments. I know we did some manual superficial checks that In the mean time, if you have a reproduction, we could try to see what exactly QuickJS is choking on. |
Beta Was this translation helpful? Give feedback.
-
Looks like it chokes on
|
Beta Was this translation helpful? Give feedback.
-
Added |
Beta Was this translation helpful? Give feedback.
Thanks for tracking this down and filing an issue. Yes the compartment evaluator optimizes into a
const
any non-configurable and non-writable property of the compartment's global to avoid having the lookup for these go through thewith
machinery.Similarly the 4 layers of nested
with
is in part to avoid having to go through a proxy object when simply looking up a name on the compartment's global. The proxy is only there to prevent the lookup from escaping to the actual global scope.I see in the issue the bug can be reduced to declaring a
const undefined
which makes sense as the proxy andwith
aren't really involved here. Interesting that there may not be a test262 to catch this. FYI @gib…