tor-browser

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

commit 555cad41c3fda6f8f89b32b116f40710c62a2baf
parent b9eea0033f00d7f08df55efd3b5ac7facb2ab963
Author: Emilio Cobos Álvarez <emilio@crisal.io>
Date:   Mon, 29 Dec 2025 20:42:03 +0000

Bug 2000981 - Deal with clamping to end of block. r=jfkthame,layout-reviewers

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

Diffstat:
Mlayout/generic/nsBlockFrame.cpp | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp @@ -1441,7 +1441,9 @@ void nsBlockFrame::Reflow(nsPresContext* aPresContext, ReflowOutput& aMetrics, // will take effect for the current line list. Only to be used when there are // enough lines that the clamp will apply. auto getClampPosition = [&](uint32_t aClampCount) -> BalanceTarget { - MOZ_ASSERT(aClampCount < mLines.size()); + if (NS_WARN_IF(aClampCount >= mLines.size())) { + return BalanceTarget{}; + } auto iter = mLines.begin(); for (uint32_t i = 0; i < aClampCount; i++) { ++iter;