mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 05:15:45 +00:00
We can destroy style contexts during ruletree reconstruct. Bug 403454, r+sr=dbaron
This commit is contained in:
parent
8bcb636fa4
commit
02f1bf69e6
@ -858,14 +858,16 @@ nsStyleSet::NotifyStyleContextDestroyed(nsPresContext* aPresContext,
|
||||
return;
|
||||
|
||||
NS_ASSERTION(mRuleWalker->AtRoot(), "Rule walker should be at root");
|
||||
|
||||
if (mOldRuleTree)
|
||||
return;
|
||||
|
||||
// Remove style contexts from mRoots even if mOldRuleTree is non-null. This
|
||||
// could be a style context from the new ruletree!
|
||||
if (!aStyleContext->GetParent()) {
|
||||
mRoots.RemoveElement(aStyleContext);
|
||||
}
|
||||
|
||||
if (mOldRuleTree)
|
||||
return;
|
||||
|
||||
if (++mDestroyedCount == kGCInterval) {
|
||||
mDestroyedCount = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user