зеркало из https://github.com/mozilla/gecko-dev.git
Bug 881822 - Don't double-refcount HTMLBodyElement::mContentStyleRule; r=bholley
This commit is contained in:
Родитель
e0918cb8dc
Коммит
89bd855192
|
@ -30,8 +30,8 @@ namespace dom {
|
|||
//----------------------------------------------------------------------
|
||||
|
||||
BodyRule::BodyRule(HTMLBodyElement* aPart)
|
||||
: mPart(aPart)
|
||||
{
|
||||
mPart = aPart;
|
||||
}
|
||||
|
||||
BodyRule::~BodyRule()
|
||||
|
@ -349,9 +349,7 @@ HTMLBodyElement::UnbindFromTree(bool aDeep, bool aNullParent)
|
|||
{
|
||||
if (mContentStyleRule) {
|
||||
mContentStyleRule->mPart = nullptr;
|
||||
|
||||
// destroy old style rule
|
||||
NS_RELEASE(mContentStyleRule);
|
||||
mContentStyleRule = nullptr;
|
||||
}
|
||||
|
||||
nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);
|
||||
|
@ -420,7 +418,6 @@ HTMLBodyElement::WalkContentStyleRules(nsRuleWalker* aRuleWalker)
|
|||
// XXXbz should this use OwnerDoc() or GetCurrentDoc()?
|
||||
// sXBL/XBL2 issue!
|
||||
mContentStyleRule = new BodyRule(this);
|
||||
NS_IF_ADDREF(mContentStyleRule);
|
||||
}
|
||||
if (aRuleWalker && mContentStyleRule) {
|
||||
aRuleWalker->Forward(mContentStyleRule);
|
||||
|
|
Загрузка…
Ссылка в новой задаче