tor-browser

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

commit 5b01474e6d9b845c69e890a85bb3f47273d74069
parent 01b1c99fe5762056e116515cfa7b1c0c31ea3eff
Author: Andy Wingo <wingo@igalia.com>
Date:   Mon,  8 Dec 2025 16:02:51 +0000

Bug 1977854 - Remove a couple page-size-related definitions.  r=rhunt,bvisness

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

Diffstat:
Mjs/src/wasm/WasmConstants.h | 4----
Mjs/src/wasm/WasmMemory.cpp | 2+-
2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/js/src/wasm/WasmConstants.h b/js/src/wasm/WasmConstants.h @@ -1134,10 +1134,6 @@ enum class FieldWideningOp { None, Signed, Unsigned }; // requires the size of linear memory to always be a multiple of 64KiB. static const unsigned PageSize = 64 * 1024; -static const unsigned PageBits = 16; -static_assert(PageSize == (1u << PageBits)); - -static const unsigned PageMask = ((1u << PageBits) - 1); // These limits are agreed upon with other engines for consistency. diff --git a/js/src/wasm/WasmMemory.cpp b/js/src/wasm/WasmMemory.cpp @@ -349,7 +349,7 @@ Pages wasm::ClampedMaxPages(AddressType t, Pages initialPages, // "a lot of memory". Maintain the invariant that initialPages <= // clampedMaxPages. static const uint64_t OneGib = 1 << 30; - static const Pages OneGibPages = Pages(OneGib >> wasm::PageBits); + static const Pages OneGibPages = Pages(OneGib / wasm::PageSize); Pages clampedPages = std::max(OneGibPages, initialPages); clampedMaxPages = std::min(clampedPages, clampedMaxPages);