From f81334d5bd1df723b1543dd906bd5672808bc75f Mon Sep 17 00:00:00 2001 From: Aaron O'Mullan Date: Tue, 22 Mar 2022 16:39:58 +0100 Subject: feat(core): disableable extensions & ops (#14063) Streamlines a common middleware pattern and provides foundations for avoiding variably sized v8::ExternalReferences & enabling fully monomorphic op callpaths --- core/examples/disable_ops.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/examples/disable_ops.rs') diff --git a/core/examples/disable_ops.rs b/core/examples/disable_ops.rs index 7421961d4..c1473b193 100644 --- a/core/examples/disable_ops.rs +++ b/core/examples/disable_ops.rs @@ -9,7 +9,7 @@ use deno_core::RuntimeOptions; fn main() { let my_ext = Extension::builder() .middleware(|op| match op.name { - "op_print" => deno_core::op_void_sync::decl(), + "op_print" => op.disable(), _ => op, }) .build(); -- cgit v1.2.3