summaryrefslogtreecommitdiff
path: root/cli/worker.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-02-15 01:18:36 +0100
committerGitHub <noreply@github.com>2020-02-15 01:18:36 +0100
commita0f015b1a39463ec0e98ec204ca727a5f023b200 (patch)
treec5c464756c2dd1be59787fb2a95433e5f290256e /cli/worker.rs
parent87c329c45ac0e3382c115793094317df15cbe5bf (diff)
refactor: replace Arc<Box<..>> with Rc<..> (#3996)
Diffstat (limited to 'cli/worker.rs')
-rw-r--r--cli/worker.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/cli/worker.rs b/cli/worker.rs
index c975a588a..fa04d5a8f 100644
--- a/cli/worker.rs
+++ b/cli/worker.rs
@@ -18,6 +18,7 @@ use std::future::Future;
use std::ops::Deref;
use std::ops::DerefMut;
use std::pin::Pin;
+use std::rc::Rc;
use std::sync::Arc;
use std::task::Context;
use std::task::Poll;
@@ -99,8 +100,8 @@ pub struct Worker {
impl Worker {
pub fn new(name: String, startup_data: StartupData, state: State) -> Self {
- let mut isolate =
- deno_core::EsIsolate::new(Box::new(state.clone()), startup_data, false);
+ let loader = Rc::new(state.clone());
+ let mut isolate = deno_core::EsIsolate::new(loader, startup_data, false);
let global_state_ = state.borrow().global_state.clone();
isolate.set_js_error_create(move |v8_exception| {