diff options
Diffstat (limited to 'cli/tsc.rs')
-rw-r--r-- | cli/tsc.rs | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/cli/tsc.rs b/cli/tsc.rs index 77b855dd1..e3c7d9d84 100644 --- a/cli/tsc.rs +++ b/cli/tsc.rs @@ -9,6 +9,7 @@ use crate::file_fetcher::SourceFileFetcher; use crate::flags::Flags; use crate::fmt_errors::JsError; use crate::global_state::GlobalState; +use crate::js; use crate::module_graph::ModuleGraph; use crate::module_graph::ModuleGraphLoader; use crate::msg; @@ -16,7 +17,6 @@ use crate::msg::MediaType; use crate::ops; use crate::permissions::Permissions; use crate::source_maps::SourceMapGetter; -use crate::startup_data; use crate::state::State; use crate::swc_util; use crate::swc_util::AstParser; @@ -28,7 +28,6 @@ use crate::worker::Worker; use core::task::Context; use deno_core::ErrBox; use deno_core::ModuleSpecifier; -use deno_core::StartupData; use futures::future::Future; use futures::future::FutureExt; use log::debug; @@ -134,12 +133,9 @@ pub struct CompilerWorker { } impl CompilerWorker { - pub fn new( - name: String, - startup_data: StartupData, - state: &Rc<State>, - ) -> Self { - let mut worker = Worker::new(name, startup_data, state); + pub fn new(name: String, state: &Rc<State>) -> Self { + let mut worker = + Worker::new(name, Some(js::compiler_isolate_init()), state); let response = Arc::new(Mutex::new(None)); ops::runtime::init(&mut worker); ops::errors::init(&mut worker); @@ -232,11 +228,7 @@ fn create_compiler_worker( // Count how many times we start the compiler worker. global_state.compiler_starts.fetch_add(1, Ordering::SeqCst); - let mut worker = CompilerWorker::new( - "TS".to_string(), - startup_data::compiler_isolate_init(), - &worker_state, - ); + let mut worker = CompilerWorker::new("TS".to_string(), &worker_state); worker .execute("globalThis.bootstrapCompilerRuntime()") .unwrap(); |