summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorAaron O'Mullan <aaron.omullan@gmail.com>2021-04-30 16:38:35 +0200
committerGitHub <noreply@github.com>2021-04-30 10:38:35 -0400
commit5ec478b5fa6261e2b2d3c8daed3cba9e780730c7 (patch)
tree9662acbbfca40b2a5aea25b63f239e39bd254c37 /runtime
parentf31ee8d1bfc50de6cef5b746f6fd6431b7b772e5 (diff)
refactor(core): initialize extensions in runtime constructor (#10421)
This ensures that provided extensions are all correctly setup and ready to use once the JsRuntime constructor returns Note: this will also initialize ops for to-be-snapshotted runtimes
Diffstat (limited to 'runtime')
-rw-r--r--runtime/build.rs2
-rw-r--r--runtime/web_worker.rs2
-rw-r--r--runtime/worker.rs2
3 files changed, 0 insertions, 6 deletions
diff --git a/runtime/build.rs b/runtime/build.rs
index 591ebaab7..b6a9da582 100644
--- a/runtime/build.rs
+++ b/runtime/build.rs
@@ -14,8 +14,6 @@ fn create_snapshot(
snapshot_path: &Path,
files: Vec<PathBuf>,
) {
- js_runtime.init_extension_js().unwrap();
-
// TODO(nayeemrmn): https://github.com/rust-lang/cargo/issues/3946 to get the
// workspace root.
let display_root = Path::new(env!("CARGO_MANIFEST_DIR")).parent().unwrap();
diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs
index 5feb0212c..7f0a4885f 100644
--- a/runtime/web_worker.rs
+++ b/runtime/web_worker.rs
@@ -253,8 +253,6 @@ impl WebWorker {
});
}
- js_runtime.init_extension_ops().unwrap();
-
ops::web_worker::init(js_runtime, sender.clone(), handle);
ops::runtime::init(js_runtime, main_module);
ops::worker_host::init(
diff --git a/runtime/worker.rs b/runtime/worker.rs
index fddaf1f01..c2e241169 100644
--- a/runtime/worker.rs
+++ b/runtime/worker.rs
@@ -140,8 +140,6 @@ impl MainWorker {
});
}
- js_runtime.init_extension_ops().unwrap();
-
ops::runtime::init(js_runtime, main_module);
ops::worker_host::init(
js_runtime,