From 83bece56b01f6997cb71e9289a4d83a398cde0c8 Mon Sep 17 00:00:00 2001 From: Aaron O'Mullan Date: Sun, 25 Apr 2021 22:00:05 +0200 Subject: refactor(core): move op cache sync responsibility to rust space (#10340) Even if bootstrapping the JS runtime is low level, it's an abstraction leak of core to require users to call `Deno.core.ops()` in JS space. So instead we're introducing a `JsRuntime::sync_ops_cache()` method, once we have runtime extensions a new runtime will ensure the ops cache is setup (for the provided extensions) and then loading/unloading plugins should be the only operations that require op cache syncs --- cli/tsc.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'cli/tsc.rs') diff --git a/cli/tsc.rs b/cli/tsc.rs index 0fac29ce3..167b5b110 100644 --- a/cli/tsc.rs +++ b/cli/tsc.rs @@ -496,6 +496,7 @@ pub fn exec(request: Request) -> Result { runtime.register_op("op_load", op(load)); runtime.register_op("op_resolve", op(resolve)); runtime.register_op("op_respond", op(respond)); + runtime.sync_ops_cache(); let startup_source = "globalThis.startup({ legacyFlag: false })"; let request_value = json!({ -- cgit v1.2.3