Bug 1508527 - Fix the memory reporter for ContentBlockingLog r=baku
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 20 Nov 2018 14:32:12 +0000
changeset 447220 fd9a2224eb523e00beccac04e958719eae6b478a
parent 447219 f70098015fd4612315f4d56b6aee4c54af6d4a7f
child 447221 209ef31926beef24da82d91223a89d26c712eccc
push id35073
push usershindli@mozilla.com
push dateTue, 20 Nov 2018 21:42:44 +0000
treeherdermozilla-central@117bb70216d3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1508527
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1508527 - Fix the memory reporter for ContentBlockingLog r=baku Differential Revision: https://phabricator.services.mozilla.com/D12380
dom/base/ContentBlockingLog.h
--- a/dom/base/ContentBlockingLog.h
+++ b/dom/base/ContentBlockingLog.h
@@ -161,17 +161,18 @@ public:
 
     // Now add the sizes of each origin log queue.
     // The const_cast is needed because the nsTHashtable::Iterator interface is
     // not const-safe.  :-(
     for (auto iter = const_cast<OriginDataHashTable&>(mLog).Iter();
          !iter.Done(); iter.Next()) {
       if (iter.UserData()) {
         aSizes.mDOMOtherSize +=
-          iter.UserData()->second().ShallowSizeOfIncludingThis(aSizes.mState.mMallocSizeOf);
+          aSizes.mState.mMallocSizeOf(iter.UserData()) +
+          iter.UserData()->second().ShallowSizeOfExcludingThis(aSizes.mState.mMallocSizeOf);
       }
     }
   }
 
 private:
   OriginDataHashTable mLog;
 };