mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 19:33:18 +00:00
Bug 727625 - remove childless nsDOMCSSAttributeDeclaration from the purple buffer. r=smaug
This commit is contained in:
parent
2f190b75f4
commit
dcb1ed46ad
@ -49,6 +49,7 @@
|
||||
#include "nsIPrincipal.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsNodeUtils.h"
|
||||
#include "nsGenericElement.h"
|
||||
|
||||
namespace css = mozilla::css;
|
||||
namespace dom = mozilla::dom;
|
||||
@ -68,8 +69,26 @@ nsDOMCSSAttributeDeclaration::~nsDOMCSSAttributeDeclaration()
|
||||
MOZ_COUNT_DTOR(nsDOMCSSAttributeDeclaration);
|
||||
}
|
||||
|
||||
// If nsDOMCSSAttributeDeclaration is changed so that any additional
|
||||
// fields are traversed by the cycle collector (for instance, if
|
||||
// wrapper cache handling is changed) then CAN_SKIP must be updated.
|
||||
NS_IMPL_CYCLE_COLLECTION_1(nsDOMCSSAttributeDeclaration, mElement)
|
||||
|
||||
// nsDOMCSSAttributeDeclaration has only one cycle collected field, so
|
||||
// if mElement is going to be skipped, the attribute declaration can't
|
||||
// be part of a garbage cycle.
|
||||
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_BEGIN(nsDOMCSSAttributeDeclaration)
|
||||
return !tmp->mElement || nsGenericElement::CanSkip(tmp->mElement, true);
|
||||
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_IN_CC_BEGIN(nsDOMCSSAttributeDeclaration)
|
||||
return !tmp->mElement || nsGenericElement::CanSkipInCC(tmp->mElement);
|
||||
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_IN_CC_END
|
||||
|
||||
// CanSkipThis returns false to avoid problems with incomplete unlinking.
|
||||
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_BEGIN(nsDOMCSSAttributeDeclaration)
|
||||
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_END
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN(nsDOMCSSAttributeDeclaration)
|
||||
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
|
||||
NS_INTERFACE_MAP_ENTRIES_CYCLE_COLLECTION(nsDOMCSSAttributeDeclaration)
|
||||
|
@ -66,8 +66,8 @@ public:
|
||||
~nsDOMCSSAttributeDeclaration();
|
||||
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsDOMCSSAttributeDeclaration,
|
||||
nsICSSDeclaration)
|
||||
NS_DECL_CYCLE_COLLECTION_SKIPPABLE_CLASS_AMBIGUOUS(nsDOMCSSAttributeDeclaration,
|
||||
nsICSSDeclaration)
|
||||
|
||||
// If GetCSSDeclaration returns non-null, then the decl it returns
|
||||
// is owned by our current style rule.
|
||||
|
Loading…
Reference in New Issue
Block a user