summaryrefslogtreecommitdiff
path: root/core/plugins.rs
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2020-04-19 23:54:46 -0400
committerGitHub <noreply@github.com>2020-04-19 23:54:46 -0400
commitc1ec042a0011eeba2480b892a335ca7804c59180 (patch)
tree02d9595a3a6be9fb646171be29f59a3c0f74f12f /core/plugins.rs
parent4e3532fe7b61a1050b00611081cc83af8b02de70 (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 'core/plugins.rs')
-rw-r--r--core/plugins.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/core/plugins.rs b/core/plugins.rs
index c6e63c975..a423790bc 100644
--- a/core/plugins.rs
+++ b/core/plugins.rs
@@ -1,5 +1,7 @@
-use crate::isolate::ZeroCopyBuf;
-use crate::ops::Op;
+// TODO(ry) This plugin module is superfluous. Try to remove definitions for
+// "init_fn!", "PluginInitFn", and "PluginInitContext".
+
+use crate::ops::OpDispatcher;
pub type PluginInitFn = fn(context: &mut dyn PluginInitContext);
@@ -7,7 +9,7 @@ pub trait PluginInitContext {
fn register_op(
&mut self,
name: &str,
- op: Box<dyn Fn(&[u8], Option<ZeroCopyBuf>) -> Op + 'static>,
+ op: Box<OpDispatcher>, // TODO(ry) rename to dispatcher, not op.
);
}