mirror of
https://github.com/denoland/deno.git
synced 2025-07-24 05:35:33 +00:00
refactor: replace Arc<Box<..>> with Rc<..> (#3996)
This commit is contained in:
parent
87c329c45a
commit
a0f015b1a3
6 changed files with 33 additions and 33 deletions
|
@ -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| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue