Bug 873664 - remove two unused fields from nsCycleCollector.cpp r=smaug
authorAndrew McCreight <amccreight@mozilla.com>
Fri, 17 May 2013 16:59:34 -0700
changeset 143783 584cfff7da90920ed3a212fc470def2310b9efd4
parent 143782 02afb50709f07a6883b6a63b65899acc53ad3dc2
child 143784 8a53b2daa50e60c1b736af2ca43012cd152f40cb
push id2697
push userbbajaj@mozilla.com
push dateMon, 05 Aug 2013 18:49:53 +0000
treeherdermozilla-beta@dfec938c7b63 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs873664
milestone24.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 873664 - remove two unused fields from nsCycleCollector.cpp r=smaug
xpcom/base/nsCycleCollector.cpp
--- a/xpcom/base/nsCycleCollector.cpp
+++ b/xpcom/base/nsCycleCollector.cpp
@@ -700,24 +700,22 @@ private:
                     aVisitor.Visit(aBuffer, e);
                 }
             }
         }
     };
     // This class wraps a linked list of the elements in the purple
     // buffer.
 
-    nsCycleCollectorParams &mParams;
     uint32_t mCount;
     Block mFirstBlock;
     nsPurpleBufferEntry *mFreeList;
 
 public:
-    nsPurpleBuffer(nsCycleCollectorParams &params)
-        : mParams(params)
+    nsPurpleBuffer()
     {
         InitBlocks();
     }
 
     ~nsPurpleBuffer()
     {
         FreeBlocks();
     }
@@ -858,20 +856,18 @@ public:
 
         // Don't measure mFirstBlock because it's within |this|.
         const Block *block = mFirstBlock.mNext;
         while (block) {
             n += aMallocSizeOf(block);
             block = block->mNext;
         }
 
-        // These fields are deliberately not measured:
-        // - mParams: because it only contains scalars.
-        // - mFreeList: because it points into the purple buffer, which is
-        //   within mFirstBlock and thus within |this|.
+        // mFreeList is deliberately not measured because it points into
+        // the purple buffer, which is within mFirstBlock and thus within |this|.
         //
         // We also don't measure the things pointed to by mEntries[] because
         // those pointers are non-owning.
 
         return n;
     }
 };
 
@@ -996,17 +992,16 @@ public:
 ////////////////////////////////////////////////////////////////////////
 // Top level structure for the cycle collector.
 ////////////////////////////////////////////////////////////////////////
 
 class nsCycleCollector
 {
     friend class GCGraphBuilder;
 
-    CCThreadingModel mModel;
     bool mCollectionInProgress;
     bool mScanInProgress;
     bool mFollowupCollection;
     nsCycleCollectorResults *mResults;
     TimeStamp mCollectionStart;
 
     nsCycleCollectionJSRuntime *mJSRuntime;
 
@@ -2508,31 +2503,29 @@ class CycleCollectorMultiReporter MOZ_FI
 NS_IMPL_ISUPPORTS1(CycleCollectorMultiReporter, nsIMemoryMultiReporter)
 
 
 ////////////////////////////////////////////////////////////////////////
 // Collector implementation
 ////////////////////////////////////////////////////////////////////////
 
 nsCycleCollector::nsCycleCollector(CCThreadingModel aModel) :
-    mModel(aModel),
     mCollectionInProgress(false),
     mScanInProgress(false),
     mResults(nullptr),
     mJSRuntime(nullptr),
     mRunner(nullptr),
     mThread(PR_GetCurrentThread()),
     mWhiteNodes(nullptr),
     mWhiteNodeCount(0),
     mVisitedRefCounted(0),
     mVisitedGCed(0),
     mBeforeUnlinkCB(nullptr),
     mForgetSkippableCB(nullptr),
     mReporter(nullptr),
-    mPurpleBuf(mParams),
     mUnmergedNeeded(0),
     mMergedInARow(0)
 {
     nsRefPtr<nsCycleCollectorRunner> runner =
         new nsCycleCollectorRunner(this, aModel);
     runner.forget(&mRunner);
 }