зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1291885 - Use leak logging in a few more places. r=emilio
This commit is contained in:
Родитель
c9097e6d3d
Коммит
3b101f50f2
|
@ -95,16 +95,31 @@ private:
|
||||||
struct OwningStyleContextSource
|
struct OwningStyleContextSource
|
||||||
{
|
{
|
||||||
explicit OwningStyleContextSource(already_AddRefed<nsRuleNode> aRuleNode)
|
explicit OwningStyleContextSource(already_AddRefed<nsRuleNode> aRuleNode)
|
||||||
: mRaw(aRuleNode.take()) { MOZ_ASSERT(!mRaw.IsNull()); };
|
: mRaw(aRuleNode.take())
|
||||||
|
{
|
||||||
|
MOZ_COUNT_CTOR(OwningStyleContextSource);
|
||||||
|
MOZ_ASSERT(!mRaw.IsNull());
|
||||||
|
};
|
||||||
|
|
||||||
explicit OwningStyleContextSource(already_AddRefed<ServoComputedValues> aComputedValues)
|
explicit OwningStyleContextSource(already_AddRefed<ServoComputedValues> aComputedValues)
|
||||||
: mRaw(aComputedValues.take()) { MOZ_ASSERT(!mRaw.IsNull()); }
|
: mRaw(aComputedValues.take())
|
||||||
|
{
|
||||||
|
MOZ_COUNT_CTOR(OwningStyleContextSource);
|
||||||
|
MOZ_ASSERT(!mRaw.IsNull());
|
||||||
|
}
|
||||||
|
|
||||||
OwningStyleContextSource(OwningStyleContextSource&& aOther)
|
OwningStyleContextSource(OwningStyleContextSource&& aOther)
|
||||||
: mRaw(aOther.mRaw) { aOther.mRaw = nullptr; }
|
: mRaw(aOther.mRaw)
|
||||||
|
{
|
||||||
|
MOZ_COUNT_CTOR(OwningStyleContextSource);
|
||||||
|
aOther.mRaw = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
OwningStyleContextSource& operator=(OwningStyleContextSource&) = delete;
|
OwningStyleContextSource& operator=(OwningStyleContextSource&) = delete;
|
||||||
OwningStyleContextSource(OwningStyleContextSource&) = delete;
|
OwningStyleContextSource(OwningStyleContextSource&) = delete;
|
||||||
|
|
||||||
~OwningStyleContextSource() {
|
~OwningStyleContextSource() {
|
||||||
|
MOZ_COUNT_DTOR(OwningStyleContextSource);
|
||||||
if (mRaw.IsNull()) {
|
if (mRaw.IsNull()) {
|
||||||
// We must have invoked the move constructor.
|
// We must have invoked the move constructor.
|
||||||
} else if (IsGeckoRuleNode()) {
|
} else if (IsGeckoRuleNode()) {
|
||||||
|
|
|
@ -92,7 +92,9 @@ nsStyleContext::nsStyleContext(nsStyleContext* aParent,
|
||||||
, mFrameRefCnt(0)
|
, mFrameRefCnt(0)
|
||||||
, mComputingStruct(nsStyleStructID_None)
|
, mComputingStruct(nsStyleStructID_None)
|
||||||
#endif
|
#endif
|
||||||
{}
|
{
|
||||||
|
MOZ_COUNT_CTOR(nsStyleContext);
|
||||||
|
}
|
||||||
|
|
||||||
nsStyleContext::nsStyleContext(nsStyleContext* aParent,
|
nsStyleContext::nsStyleContext(nsStyleContext* aParent,
|
||||||
nsIAtom* aPseudoTag,
|
nsIAtom* aPseudoTag,
|
||||||
|
@ -175,6 +177,7 @@ nsStyleContext::FinishConstruction(bool aSkipParentDisplayBasedStyleFixup)
|
||||||
|
|
||||||
nsStyleContext::~nsStyleContext()
|
nsStyleContext::~nsStyleContext()
|
||||||
{
|
{
|
||||||
|
MOZ_COUNT_DTOR(nsStyleContext);
|
||||||
NS_ASSERTION((nullptr == mChild) && (nullptr == mEmptyChild), "destructing context with children");
|
NS_ASSERTION((nullptr == mChild) && (nullptr == mEmptyChild), "destructing context with children");
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|
Загрузка…
Ссылка в новой задаче