diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2020-04-19 23:54:46 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-19 23:54:46 -0400 |
commit | c1ec042a0011eeba2480b892a335ca7804c59180 (patch) | |
tree | 02d9595a3a6be9fb646171be29f59a3c0f74f12f /test_plugin/src/lib.rs | |
parent | 4e3532fe7b61a1050b00611081cc83af8b02de70 (diff) |
Modify op dispatcher to include &mut Isolate argument (#4821)
- Removes unnecessary RwLock and Rc around the op registry table
- Preparation to move resource_table to deno_core::Isolate.
- Towards #3453, #4222
Diffstat (limited to 'test_plugin/src/lib.rs')
-rw-r--r-- | test_plugin/src/lib.rs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test_plugin/src/lib.rs b/test_plugin/src/lib.rs index 70ba6d9b2..c88052e9a 100644 --- a/test_plugin/src/lib.rs +++ b/test_plugin/src/lib.rs @@ -13,7 +13,11 @@ fn init(context: &mut dyn PluginInitContext) { } init_fn!(init); -pub fn op_test_sync(data: &[u8], zero_copy: Option<ZeroCopyBuf>) -> Op { +pub fn op_test_sync( + _isolate: &mut deno_core::Isolate, + data: &[u8], + zero_copy: Option<ZeroCopyBuf>, +) -> Op { if let Some(buf) = zero_copy { let data_str = std::str::from_utf8(&data[..]).unwrap(); let buf_str = std::str::from_utf8(&buf[..]).unwrap(); @@ -27,7 +31,11 @@ pub fn op_test_sync(data: &[u8], zero_copy: Option<ZeroCopyBuf>) -> Op { Op::Sync(result_box) } -pub fn op_test_async(data: &[u8], zero_copy: Option<ZeroCopyBuf>) -> Op { +pub fn op_test_async( + _isolate: &mut deno_core::Isolate, + data: &[u8], + zero_copy: Option<ZeroCopyBuf>, +) -> Op { let data_str = std::str::from_utf8(&data[..]).unwrap().to_string(); let fut = async move { if let Some(buf) = zero_copy { |