From 4cdc0ce964c44ba35708ccce162b398d8fd4dbe4 Mon Sep 17 00:00:00 2001 From: FranklinDM Date: Thu, 28 Mar 2024 20:09:30 +0800 Subject: [PATCH] Issue #2112 - Follow-up: Fix broken rule node assertion --- layout/style/nsStyleContext.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/layout/style/nsStyleContext.cpp b/layout/style/nsStyleContext.cpp index 6fd271667b..da0853c7cc 100644 --- a/layout/style/nsStyleContext.cpp +++ b/layout/style/nsStyleContext.cpp @@ -160,10 +160,10 @@ nsStyleContext::~nsStyleContext() #endif nsPresContext *presContext = PresContext(); - DebugOnly geckoStyleSet = presContext->PresShell()->StyleSet()->GetAsGecko(); - NS_ASSERTION(!geckoStyleSet || - geckoStyleSet->GetRuleTree() == mSource.AsGeckoRuleNode()->RuleTree() || - geckoStyleSet->IsInRuleTreeReconstruct(), + DebugOnly styleSet = presContext->PresShell()->StyleSet()->GetAsGecko(); + NS_ASSERTION(!styleSet || + styleSet->GetRuleTree() == mRuleNode->RuleTree() || + styleSet->IsInRuleTreeReconstruct(), "destroying style context from old rule tree too late"); if (mParent) {