From 60e75026b0b4d4b5039bb1af37bfdbf0e389dbc3 Mon Sep 17 00:00:00 2001 From: "dbaron%dbaron.org" Date: Thu, 27 Apr 2006 18:23:30 +0000 Subject: [PATCH] Move assertion up to where we have a chance of actually seeing it. --- layout/style/nsStyleSet.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layout/style/nsStyleSet.cpp b/layout/style/nsStyleSet.cpp index 75922c640b5d..d108c16fd82a 100644 --- a/layout/style/nsStyleSet.cpp +++ b/layout/style/nsStyleSet.cpp @@ -765,6 +765,8 @@ nsStyleSet::NotifyStyleContextDestroyed(nsPresContext* aPresContext, if (mInShutdown) return; + NS_ASSERTION(mRuleWalker->AtRoot(), "Rule walker should be at root"); + if (!aStyleContext->GetParent()) { mRoots.RemoveElement(aStyleContext); } @@ -781,7 +783,6 @@ nsStyleSet::NotifyStyleContextDestroyed(nsPresContext* aPresContext, } // Sweep the rule tree. - NS_ASSERTION(mRuleWalker->AtRoot(), "Rule walker should be at root"); #ifdef DEBUG PRBool deleted = #endif