Commit 66654a80 authored by Boris Zbarsky's avatar Boris Zbarsky
Browse files

Bug 1397813. Make sure to memory-report the ServoStyleContexts for anon boxes...

Bug 1397813.  Make sure to memory-report the ServoStyleContexts for anon boxes and lazy pseudos that we cache on the parent ServoStyleContext.  r=njn
parent b9867606
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -111,6 +111,16 @@ public:
    // clearly identify in DMD's output the memory measured here.
    *aCVsSize += ServoComputedValuesMallocEnclosingSizeOf(this);
    mSource.AddSizeOfExcludingThis(aSizes);

    if (mNextInheritingAnonBoxStyle &&
        !aSizes.mState.HaveSeenPtr(mNextInheritingAnonBoxStyle)) {
      mNextInheritingAnonBoxStyle->AddSizeOfIncludingThis(aSizes, aCVsSize);
    }

    if (mNextLazyPseudoStyle &&
        !aSizes.mState.HaveSeenPtr(mNextLazyPseudoStyle)) {
      mNextLazyPseudoStyle->AddSizeOfIncludingThis(aSizes, aCVsSize);
    }
  }

private: