tor-browser

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

commit d1491cd093113845b4f62af4c19e40f6a291aad0
parent ee661ef511d82f1db62701569c139ad8057d0e88
Author: Andrew McCreight <continuation@gmail.com>
Date:   Tue, 16 Dec 2025 19:21:48 +0000

Bug 1730080 - Drop the Span::storage_type assert from release builds. r=sergesanspaille

This assertion takes like 10% of the time in a BigInt microbenchmark. It doesn't
seem to correspond to any particular hardened check in std::span.

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

Diffstat:
Mmfbt/Span.h | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/mfbt/Span.h b/mfbt/Span.h @@ -847,9 +847,8 @@ class MOZ_GSL_POINTER Span { , data_(elements ? elements : reinterpret_cast<pointer>(alignof(element_type))) { - const size_t extentSize = ExtentType::size(); - MOZ_RELEASE_ASSERT((!elements && extentSize == 0) || - (elements && extentSize != dynamic_extent)); + MOZ_ASSERT((!elements && ExtentType::size() == 0) || + (elements && ExtentType::size() != dynamic_extent)); } constexpr pointer data() const { return data_; }