summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/ffi/lib.rs3
-rw-r--r--ext/flash/lib.rs6
2 files changed, 6 insertions, 3 deletions
diff --git a/ext/ffi/lib.rs b/ext/ffi/lib.rs
index 52e101a92..7e7756c93 100644
--- a/ext/ffi/lib.rs
+++ b/ext/ffi/lib.rs
@@ -1829,9 +1829,10 @@ impl Future for CallbackInfo {
#[op]
fn op_ffi_unsafe_callback_ref(
- state: &mut deno_core::OpState,
+ state: Rc<RefCell<deno_core::OpState>>,
rid: ResourceId,
) -> Result<impl Future<Output = Result<(), AnyError>>, AnyError> {
+ let state = state.borrow();
let callback_resource =
state.resource_table.get::<UnsafeCallbackResource>(rid)?;
diff --git a/ext/flash/lib.rs b/ext/flash/lib.rs
index d08cdbcdc..04ed54e1a 100644
--- a/ext/flash/lib.rs
+++ b/ext/flash/lib.rs
@@ -1290,10 +1290,11 @@ where
#[op]
fn op_flash_wait_for_listening(
- state: &mut OpState,
+ state: Rc<RefCell<OpState>>,
server_id: u32,
) -> Result<impl Future<Output = Result<u16, AnyError>> + 'static, AnyError> {
let mut listening_rx = {
+ let mut state = state.borrow_mut();
let flash_ctx = state.borrow_mut::<FlashContext>();
let server_ctx = flash_ctx
.servers
@@ -1312,10 +1313,11 @@ fn op_flash_wait_for_listening(
#[op]
fn op_flash_drive_server(
- state: &mut OpState,
+ state: Rc<RefCell<OpState>>,
server_id: u32,
) -> Result<impl Future<Output = Result<(), AnyError>> + 'static, AnyError> {
let join_handle = {
+ let mut state = state.borrow_mut();
let flash_ctx = state.borrow_mut::<FlashContext>();
flash_ctx
.join_handles