From 71998db820a14cc1379e0ac784d4fee5fb439f2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Wed, 7 Dec 2022 12:13:53 +0100 Subject: [PATCH] Bug 1803968 - Fix a bogus assert that was caught by GCC. sizeof() is the wrong thing to test against there. And the 0 check is unneeded now that counter styles are unsigned. MANUAL PUSH: Trivial base toolchains fix CLOSED TREE --- layout/style/CounterStyleManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layout/style/CounterStyleManager.cpp b/layout/style/CounterStyleManager.cpp index 9801d293dfde..01c3dcf36917 100644 --- a/layout/style/CounterStyleManager.cpp +++ b/layout/style/CounterStyleManager.cpp @@ -1814,7 +1814,7 @@ CounterStyle* CounterStyleManager::ResolveCounterStyle(nsAtom* aName) { /* static */ CounterStyle* CounterStyleManager::GetBuiltinStyle(ListStyle aStyle) { - MOZ_ASSERT(0 <= size_t(aStyle) && size_t(aStyle) < sizeof(gBuiltinStyleTable), + MOZ_ASSERT(size_t(aStyle) < ArrayLength(gBuiltinStyleTable), "Require a valid builtin style constant"); MOZ_ASSERT(!gBuiltinStyleTable[size_t(aStyle)].IsDependentStyle(), "Cannot get dependent builtin style");