diff options
Diffstat (limited to 'ext/node/polyfills/vm.ts')
-rw-r--r-- | ext/node/polyfills/vm.ts | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/ext/node/polyfills/vm.ts b/ext/node/polyfills/vm.ts index 221770ffe..ef817456a 100644 --- a/ext/node/polyfills/vm.ts +++ b/ext/node/polyfills/vm.ts @@ -3,10 +3,11 @@ // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file no-explicit-any prefer-primordials +import { core } from "ext:core/mod.js"; import { notImplemented } from "ext:deno_node/_utils.ts"; - -const { core } = globalThis.__bootstrap; -const ops = core.ops; +const { + op_vm_run_in_new_context, +} = core.ensureFastOps(); export class Script { code: string; @@ -32,7 +33,7 @@ export class Script { "Script.runInNewContext options are currently not supported", ); } - return ops.op_vm_run_in_new_context(this.code, contextObject); + return op_vm_run_in_new_context(this.code, contextObject); } createCachedData() { @@ -64,7 +65,7 @@ export function runInNewContext( if (options) { console.warn("vm.runInNewContext options are currently not supported"); } - return ops.op_vm_run_in_new_context(code, contextObject); + return op_vm_run_in_new_context(code, contextObject); } export function runInThisContext( |