mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1258017 - Use an nsCOMPtr to hold onto the nsIStyleRule. r=dbaron
This commit is contained in:
parent
4f8c8b64aa
commit
fcdabfac83
@ -1523,10 +1523,6 @@ nsRuleNode::nsRuleNode(nsPresContext* aContext, nsRuleNode* aParent,
|
||||
mChildren.asVoid = nullptr;
|
||||
MOZ_COUNT_CTOR(nsRuleNode);
|
||||
|
||||
if (mRule) {
|
||||
mRule->AddRef();
|
||||
}
|
||||
|
||||
NS_ASSERTION(IsRoot() || GetLevel() == aLevel, "not enough bits");
|
||||
NS_ASSERTION(IsRoot() || IsImportantRule() == aIsImportant, "yikes");
|
||||
/* If IsRoot(), then aContext->StyleSet() is typically null at this
|
||||
@ -1552,9 +1548,6 @@ nsRuleNode::~nsRuleNode()
|
||||
MOZ_COUNT_DTOR(nsRuleNode);
|
||||
if (mStyleData.mResetData || mStyleData.mInheritedData)
|
||||
mStyleData.Destroy(mDependentBits, mPresContext);
|
||||
if (mRule) {
|
||||
mRule->Release();
|
||||
}
|
||||
}
|
||||
|
||||
nsRuleNode*
|
||||
|
@ -420,7 +420,8 @@ private:
|
||||
// most specific rule matched to the least
|
||||
// specific rule (which is the optimal order to
|
||||
// use for lookups of style properties.
|
||||
nsIStyleRule* const mRule; // [STRONG] A pointer to our specific rule.
|
||||
|
||||
const nsCOMPtr<nsIStyleRule> mRule; // A pointer to our specific rule.
|
||||
|
||||
nsRuleNode* mNextSibling; // This value should be used only by the
|
||||
// parent, since the parent may store
|
||||
|
Loading…
Reference in New Issue
Block a user