Bug 1329200: Remove unused FrameManager global generation counter. r=xidorn
authorEmilio Cobos Álvarez <emilio@crisal.io>
Fri, 06 Jan 2017 16:03:41 +0100
changeset 328361 aadc84fe447251962ab5fc7cf79b379c83c7db34
parent 328360 3111403f3ac28c7f40a642f3dc5f4ae35031a9dd
child 328362 923cb5583464e41dd031580bec2db22a402efc9b
push id31168
push userryanvm@gmail.com
push dateSat, 07 Jan 2017 16:20:16 +0000
treeherdermozilla-central@2d62b03b833b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersxidorn
bugs1329200
milestone53.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 1329200: Remove unused FrameManager global generation counter. r=xidorn MozReview-Commit-ID: AXkaZYxpK2y
layout/base/nsCSSFrameConstructor.cpp
layout/base/nsFrameManager.cpp
layout/base/nsFrameManagerBase.h
layout/base/nsPresContext.h
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -8748,17 +8748,16 @@ nsCSSFrameConstructor::BeginUpdate() {
                "Someone forgot a script blocker");
 
   nsRootPresContext* rootPresContext =
     mPresShell->GetPresContext()->GetRootPresContext();
   if (rootPresContext) {
     rootPresContext->IncrementDOMGeneration();
   }
 
-  ++sGlobalGenerationNumber;
 #ifdef DEBUG
   ++mUpdateCount;
 #endif
 }
 
 void
 nsCSSFrameConstructor::EndUpdate()
 {
--- a/layout/base/nsFrameManager.cpp
+++ b/layout/base/nsFrameManager.cpp
@@ -826,10 +826,8 @@ RemoveUndisplayedEntry(PLHashEntry* he, 
 }
 
 void
 nsFrameManagerBase::UndisplayedMap::Clear(void)
 {
   mLastLookup = nullptr;
   PL_HashTableEnumerateEntries(mTable, RemoveUndisplayedEntry, 0);
 }
-
-uint32_t nsFrameManagerBase::sGlobalGenerationNumber;
--- a/layout/base/nsFrameManagerBase.h
+++ b/layout/base/nsFrameManagerBase.h
@@ -40,33 +40,21 @@ public:
    */
   nsIFrame* GetRootFrame() const { return mRootFrame; }
   void      SetRootFrame(nsIFrame* aRootFrame)
   {
     NS_ASSERTION(!mRootFrame, "already have a root frame");
     mRootFrame = aRootFrame;
   }
 
-  static uint32_t GetGlobalGenerationNumber() { return sGlobalGenerationNumber; }
-
 protected:
   class UndisplayedMap;
 
   // weak link, because the pres shell owns us
   nsIPresShell* MOZ_NON_OWNING_REF mPresShell;
   nsIFrame*                       mRootFrame;
   PLDHashTable                    mPlaceholderMap;
   UndisplayedMap*                 mUndisplayedMap;
   UndisplayedMap*                 mDisplayContentsMap;
   bool                            mIsDestroyingFrames;  // The frame manager is destroying some frame(s).
-
-  // The frame tree generation number
-  // We use this to avoid unnecessary screenshotting
-  // on Android. Unfortunately, this is static to match
-  // the single consumer which is also static. Keeping
-  // this the same greatly simplifies lifetime issues and
-  // makes sure we always using the correct number.
-  // A per PresContext generation number is available
-  // via nsPresContext::GetDOMGeneration
-  static uint32_t                 sGlobalGenerationNumber;
 };
 
 #endif
--- a/layout/base/nsPresContext.h
+++ b/layout/base/nsPresContext.h
@@ -1548,19 +1548,16 @@ public:
    * Increment DOM-modification generation counter to indicate that
    * the DOM has changed in a way that might lead to style changes/
    * reflows/frame creation and destruction.
    */
   void IncrementDOMGeneration() { mDOMGeneration++; }
 
   /**
    * Get the current DOM generation counter.
-   *
-   * See nsFrameManagerBase::GetGlobalGenerationNumber() for a
-   * global generation number.
    */
   uint32_t GetDOMGeneration() { return mDOMGeneration; }
 
   /**
    * Add a runnable that will get called before the next paint. They will get
    * run eventually even if painting doesn't happen. They might run well before
    * painting happens.
    */