tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 2111459bac1d5a92c83b6c344f34bd8537170693
parent 6bc0995a91e5a29f4e9d299e738085dcd474fda4
Author: Cornelius Emase <corneliuslochipi@gmail.com>
Date:   Tue, 28 Oct 2025 16:17:22 +0000

Bug 1996578 - Add experimental import bytes pref and shell option r=dminor

Added an experimental pref `javascript.options.experimental.import_bytes` (default false)
and a JS shell flag `--enable-import-bytes`

Differential Revision: https://phabricator.services.mozilla.com/D270298

Diffstat:
Mjs/src/shell/js.cpp | 4++++
Mmodules/libpref/init/StaticPrefList.yaml | 7+++++++
2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp @@ -13192,6 +13192,7 @@ bool InitOptionParser(OptionParser& op) { "Disable Explicit Resource Management") || !op.addBoolOption('\0', "enable-temporal", "Enable Temporal") || !op.addBoolOption('\0', "enable-upsert", "Enable Upsert proposal") || + !op.addBoolOption('\0', "enable-import-bytes", "Enable import bytes") || !op.addBoolOption('\0', "enable-arraybuffer-immutable", "Enable immutable ArrayBuffers")) { return false; @@ -13269,6 +13270,9 @@ bool SetGlobalOptionsPreJSInit(const OptionParser& op) { if (op.getBoolOption("enable-arraybuffer-immutable")) { JS::Prefs::setAtStartup_experimental_arraybuffer_immutable(true); } + if (op.getBoolOption("enable-import-bytes")) { + JS::Prefs::setAtStartup_experimental_import_bytes(true); + } #endif #ifdef ENABLE_EXPLICIT_RESOURCE_MANAGEMENT if (op.getBoolOption("enable-explicit-resource-management")) { diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml @@ -8978,6 +8978,13 @@ mirror: always set_spidermonkey_pref: startup + # Experimental support for import bytes in JavaScript. +- name: javascript.options.experimental.import_bytes + type: bool + value: false + mirror: always + set_spidermonkey_pref: startup + #endif // NIGHTLY_BUILD # Whether to Baseline-compile self-hosted functions the first time they are