summaryrefslogtreecommitdiff
path: root/core/extensions.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-03-18 10:59:51 -0400
committerGitHub <noreply@github.com>2023-03-18 14:59:51 +0000
commitd11e89127d723d84afe6e5603b731c014a54f9da (patch)
tree06dbfe0b8d8eb965e477472cff223a8d335c50ad /core/extensions.rs
parent8af0c8351935ea7c6c0441055d5164908322c9d6 (diff)
Revert "perf(core): preserve ops between snapshots (#18080)" (#18267)
This reverts commit 4b6305f4f25fc76f974bbdcc9cdb139d5ab8f5f4.
Diffstat (limited to 'core/extensions.rs')
-rw-r--r--core/extensions.rs16
1 files changed, 0 insertions, 16 deletions
diff --git a/core/extensions.rs b/core/extensions.rs
index 2a578429b..728ebd512 100644
--- a/core/extensions.rs
+++ b/core/extensions.rs
@@ -53,7 +53,6 @@ pub struct OpDecl {
pub is_unstable: bool,
pub is_v8: bool,
pub fast_fn: Option<Box<dyn FastFunction>>,
- pub force_registration: bool,
}
impl OpDecl {
@@ -241,7 +240,6 @@ macro_rules! extension {
#[inline(always)]
#[allow(unused_variables)]
- #[allow(clippy::redundant_closure_call)]
fn with_customizer(ext: &mut $crate::ExtensionBuilder) {
$( ($customizer_fn)(ext); )?
}
@@ -327,7 +325,6 @@ pub struct Extension {
enabled: bool,
name: &'static str,
deps: Option<&'static [&'static str]>,
- force_op_registration: bool,
}
// Note: this used to be a trait, but we "downgraded" it to a single concrete type
@@ -397,7 +394,6 @@ impl Extension {
let mut ops = self.ops.take()?;
for op in ops.iter_mut() {
op.enabled = self.enabled && op.enabled;
- op.force_registration = self.force_op_registration;
}
Some(ops)
}
@@ -451,7 +447,6 @@ pub struct ExtensionBuilder {
event_loop_middleware: Option<Box<OpEventLoopFn>>,
name: &'static str,
deps: &'static [&'static str],
- force_op_registration: bool,
}
impl ExtensionBuilder {
@@ -499,15 +494,6 @@ impl ExtensionBuilder {
self
}
- /// Mark that ops from this extension should be added to `Deno.core.ops`
- /// unconditionally. This is useful is some ops are not available
- /// during snapshotting, as ops are not registered by default when a
- /// `JsRuntime` is created with an existing snapshot.
- pub fn force_op_registration(&mut self) -> &mut Self {
- self.force_op_registration = true;
- self
- }
-
/// Consume the [`ExtensionBuilder`] and return an [`Extension`].
pub fn take(self) -> Extension {
let js_files = Some(self.js);
@@ -525,7 +511,6 @@ impl ExtensionBuilder {
initialized: false,
enabled: true,
name: self.name,
- force_op_registration: self.force_op_registration,
deps,
}
}
@@ -547,7 +532,6 @@ impl ExtensionBuilder {
enabled: true,
name: self.name,
deps,
- force_op_registration: self.force_op_registration,
}
}
}