From 28a4f3d0f5383695b1d49ccdc8b0f799a715b2c2 Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Sun, 25 Jun 2023 08:35:31 +0100 Subject: Reland "refactor(core): cleanup feature flags for js source inclusion" (#19519) Relands #19463. This time the `ExtensionFileSourceCode` enum is preserved, so this effectively just splits feature `include_js_for_snapshotting` into `exclude_js_sources` and `runtime_js_sources`, adds a `force_include_js_sources` option on `extension!()`, and unifies `ext::Init_ops_and_esm()` and `ext::init_ops()` into `ext::init()`. --- core/02_error.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'core/02_error.js') diff --git a/core/02_error.js b/core/02_error.js index b29dc9b4e..c082486f4 100644 --- a/core/02_error.js +++ b/core/02_error.js @@ -14,8 +14,15 @@ ArrayPrototypePush, ArrayPrototypeMap, ArrayPrototypeJoin, + SymbolFor, } = window.__bootstrap.primordials; + const key = SymbolFor("02_error.js"); + if (globalThis.__bootstrap[key]) { + return; + } + globalThis.__bootstrap[key] = true; + // Keep in sync with `cli/fmt_errors.rs`. function formatLocation(cse) { if (cse.isNative) { -- cgit v1.2.3