diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2019-06-05 16:35:38 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-05 16:35:38 -0400 |
commit | e152dae006c941abd614cc31820981c629410d7c (patch) | |
tree | 503ef96b8e2d34c58765a504ecd2b1ee38bb9eac /cli/ops.rs | |
parent | 6fa4d2e7597e2b581a95b6c503cb4c0859f1cefa (diff) |
RecursiveLoad shouldn't own the Isolate (#2453)
This patch makes it so that RecursiveLoad doesn't own the Isolate, so
Worker::execute_mod_async does not consume itself.
Previously Worker implemented Loader, but now ThreadSafeState does.
This is necessary preparation work for dynamic import (#1789) and import
maps (#1921)
Diffstat (limited to 'cli/ops.rs')
-rw-r--r-- | cli/ops.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/cli/ops.rs b/cli/ops.rs index e41c9caa2..0e41eacc0 100644 --- a/cli/ops.rs +++ b/cli/ops.rs @@ -2067,7 +2067,7 @@ fn op_create_worker( // TODO(ry) Use execute_mod_async here. let result = worker.execute_mod(&specifier_url, false); match result { - Ok(worker) => { + Ok(()) => { let mut workers_tl = parent_state.workers.lock().unwrap(); workers_tl.insert(rid, worker.shared()); let builder = &mut FlatBufferBuilder::new(); @@ -2085,10 +2085,8 @@ fn op_create_worker( }, )) } - Err((errors::RustOrJsError::Js(_), _worker)) => { - Err(errors::worker_init_failed()) - } - Err((errors::RustOrJsError::Rust(err), _worker)) => Err(err), + Err(errors::RustOrJsError::Js(_)) => Err(errors::worker_init_failed()), + Err(errors::RustOrJsError::Rust(err)) => Err(err), } }())) } |