Fix issue 48
Breakout via RangeError: Maximum call stack size exceeded
Remove handler singleton.
MODIFY
src/evaluators.js
src/evaluators.js
@@ -76,7 +76,6 @@ export function createSafeEvaluatorFactory(
) {
const { unsafeFunction } = unsafeRec;
- const scopeHandler = createScopeHandler(unsafeRec, safeGlobal, sloppyGlobals);
const constants = getOptimizableGlobals(safeGlobal);
const scopedEvaluatorFactory = createScopedEvaluatorFactory(
unsafeRec,
@@ -112,6 +111,12 @@ export function createSafeEvaluatorFactory(
safeGlobal,
getOwnPropertyDescriptors(rewriterState.endowments)
);
+
+ const scopeHandler = createScopeHandler(
+ unsafeRec,
+ safeGlobal,
+ sloppyGlobals
+ );
const scopeProxy = new Proxy(scopeTarget, scopeHandler);
const scopedEvaluator = apply(scopedEvaluatorFactory, safeGlobal, [
scopeProxy

Fix issue 48
Breakout via RangeError: Maximum call stack size exceeded
Remove handler singleton.