diff options
author | Bert Belder <bertbelder@gmail.com> | 2020-08-18 18:30:13 +0200 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2020-08-19 02:01:48 +0200 |
commit | 27f4aeb92469660fdd78a89a7b2902c08a23ca4a (patch) | |
tree | e2076aaf31f0708e5037f46d3750f93b0d637417 /cli/ops/io.rs | |
parent | de1007fc6a2a6c2909732dcb87a5af6c1e370b09 (diff) |
Make Rc/Arc wrapper around State/GlobalState visible (#7104)
Diffstat (limited to 'cli/ops/io.rs')
-rw-r--r-- | cli/ops/io.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cli/ops/io.rs b/cli/ops/io.rs index c35e0d4b6..4d03e0ef7 100644 --- a/cli/ops/io.rs +++ b/cli/ops/io.rs @@ -11,6 +11,7 @@ use futures::future::FutureExt; use futures::ready; use std::collections::HashMap; use std::pin::Pin; +use std::rc::Rc; use std::sync::atomic::{AtomicUsize, Ordering}; use std::task::Context; use std::task::Poll; @@ -84,7 +85,7 @@ lazy_static! { }; } -pub fn init(i: &mut CoreIsolate, s: &State) { +pub fn init(i: &mut CoreIsolate, s: &Rc<State>) { i.register_op("op_read", s.stateful_minimal_op2(op_read)); i.register_op("op_write", s.stateful_minimal_op2(op_write)); } @@ -236,7 +237,7 @@ impl DenoAsyncRead for StreamResource { pub fn op_read( isolate_state: &mut CoreIsolateState, - _state: &State, + _state: &Rc<State>, is_sync: bool, rid: i32, zero_copy: &mut [ZeroCopyBuf], @@ -361,7 +362,7 @@ impl DenoAsyncWrite for StreamResource { pub fn op_write( isolate_state: &mut CoreIsolateState, - _state: &State, + _state: &Rc<State>, is_sync: bool, rid: i32, zero_copy: &mut [ZeroCopyBuf], |