From 32d1f5a7dce0c76127aad2edb566dea92b6cf917 Mon Sep 17 00:00:00 2001 From: Chengzhong Wu Date: Sat, 21 Mar 2026 14:18:31 -0400 Subject: [PATCH] repl: use vm DONT_CONTEXTIFY context --- lib/repl.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/repl.js b/lib/repl.js index 779740bfd411ad..60ea4457ab1bf6 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -1132,10 +1132,10 @@ class REPLServer extends Interface { session.once('Runtime.executionContextCreated', ({ params }) => { this[kContextId] = params.context.id; }); - context = vm.createContext(); + context = vm.createContext(vm.constants.DONT_CONTEXTIFY); session.post('Runtime.disable'); }, () => { - context = vm.createContext(); + context = vm.createContext(vm.constants.DONT_CONTEXTIFY); }); ArrayPrototypeForEach(ObjectGetOwnPropertyNames(globalThis), (name) => { // Only set properties that do not already exist as a global builtin.