Bug 1066089: Clear dependent data from CustomCounterStyle when it gets dropped from table. f=xidorn r=dbaron

This commit is contained in:
Daniel Holbert 2014-09-16 15:05:04 -07:00
parent 4a6bd9a952
commit 23d30ae6d3

View File

@ -1906,6 +1906,11 @@ InvalidateOldStyle(const nsSubstring& aKey,
static_cast<CustomCounterStyle*>(aStyle.get());
if (style->GetRule() != newRule) {
toBeRemoved = true;
// Since |style| is being removed from mCacheTable, it won't be visited
// by our post-removal InvalidateDependentData() traversal. So, we have
// to give it a manual ResetDependentData() call. (This only really
// matters if something else is holding a reference & keeping it alive.)
style->ResetDependentData();
} else if (style->GetRuleGeneration() != newRule->GetGeneration()) {
toBeUpdated = true;
style->ResetCachedData();