summaryrefslogtreecommitdiff
path: root/cli/build.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/build.rs')
-rw-r--r--cli/build.rs11
1 files changed, 3 insertions, 8 deletions
diff --git a/cli/build.rs b/cli/build.rs
index 422bc1759..f2abb9529 100644
--- a/cli/build.rs
+++ b/cli/build.rs
@@ -3,9 +3,7 @@
mod op_fetch_asset;
use deno_core::js_check;
-use deno_core::BasicState;
use deno_core::JsRuntime;
-use deno_core::OpRegistry;
use deno_core::StartupData;
use std::collections::HashMap;
use std::env;
@@ -39,8 +37,7 @@ fn create_snapshot(
}
fn create_runtime_snapshot(snapshot_path: &Path, files: Vec<PathBuf>) {
- let state = BasicState::new();
- let isolate = JsRuntime::new(state, StartupData::None, true);
+ let isolate = JsRuntime::new(StartupData::None, true);
create_snapshot(isolate, snapshot_path, files);
}
@@ -73,13 +70,11 @@ fn create_compiler_snapshot(
cwd.join("dts/lib.deno.unstable.d.ts"),
);
- let state = BasicState::new();
- state.register_op(
+ let mut isolate = JsRuntime::new(StartupData::None, true);
+ isolate.register_op(
"op_fetch_asset",
op_fetch_asset::op_fetch_asset(custom_libs),
);
-
- let isolate = JsRuntime::new(state, StartupData::None, true);
create_snapshot(isolate, snapshot_path, files);
}