summaryrefslogtreecommitdiff
path: root/cli/main.rs
diff options
context:
space:
mode:
authorAaron O'Mullan <aaron.omullan@gmail.com>2021-04-25 22:00:05 +0200
committerGitHub <noreply@github.com>2021-04-25 22:00:05 +0200
commit83bece56b01f6997cb71e9289a4d83a398cde0c8 (patch)
tree6f688f86bffd3ada71f7afa67d27a812d0bae386 /cli/main.rs
parent1c7164257d146c279b61708ddf8514d85b5fc11c (diff)
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
Diffstat (limited to 'cli/main.rs')
-rw-r--r--cli/main.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/cli/main.rs b/cli/main.rs
index 0005bb891..c42604146 100644
--- a/cli/main.rs
+++ b/cli/main.rs
@@ -148,6 +148,7 @@ fn create_web_worker_callback(
if args.use_deno_namespace {
ops::runtime_compiler::init(js_runtime);
}
+ js_runtime.sync_ops_cache();
}
worker.bootstrap(&options);
@@ -218,6 +219,7 @@ pub fn create_main_worker(
// above
ops::errors::init(js_runtime);
ops::runtime_compiler::init(js_runtime);
+ js_runtime.sync_ops_cache();
}
worker.bootstrap(&options);