From f5c31b56e3fb57a92dbaaec17690bfa9d787164e Mon Sep 17 00:00:00 2001 From: Aaron O'Mullan Date: Sun, 15 May 2022 13:27:56 +0200 Subject: Revert "core: don't include_str extension js code (#10786)" (#14614) This reverts commit 10e50a120744de71d6915af4ae93f8231607573d Alternative to #13217, IMO the tradeoffs made by #10786 aren't worth it. It breaks abstractions (crates being self-contained, deno_core without snapshotting etc...) and causes pain points / gotchas for both embedders & devs for a relatively minimal gain in incremental build time ... Closes #11030 --- ext/web/benches/timers_ops.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'ext/web/benches/timers_ops.rs') diff --git a/ext/web/benches/timers_ops.rs b/ext/web/benches/timers_ops.rs index 30f50b7d9..f5d03d6c3 100644 --- a/ext/web/benches/timers_ops.rs +++ b/ext/web/benches/timers_ops.rs @@ -26,12 +26,10 @@ fn setup() -> Vec { deno_web::init::(BlobStore::default(), None), Extension::builder() .js(vec![ - ("setup", - Box::new(|| Ok(r#" - const { opNow, setTimeout, handleTimerMacrotask } = globalThis.__bootstrap.timers; - Deno.core.setMacrotaskCallback(handleTimerMacrotask); - "#.to_owned())), - ), + ("setup", r#" + const { opNow, setTimeout, handleTimerMacrotask } = globalThis.__bootstrap.timers; + Deno.core.setMacrotaskCallback(handleTimerMacrotask); + "#), ]) .state(|state| { state.put(Permissions{}); -- cgit v1.2.3