Backed out changeset 9b63189605b8 (bug 911889)
authorEd Morley <emorley@mozilla.com>
Fri, 01 Nov 2013 12:35:00 +0000
changeset 153033 5b873aefc38331faaf2005b1ce753e215f0a93bb
parent 153032 a639df3fefcc8e3f7f5349f08f23d4e2252a9a33
child 153034 b5ac2635cb3802c7bbfdbe75760d4a5b6c5bfa82
push id25566
push userryanvm@gmail.com
push dateFri, 01 Nov 2013 18:40:05 +0000
treeherdermozilla-central@5bb07c1ae9f5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs911889
milestone28.0a1
backs out9b63189605b8b93bca6fdf42f09bd10485540220
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
Backed out changeset 9b63189605b8 (bug 911889)
layout/base/nsRefreshDriver.cpp
layout/base/nsRefreshDriver.h
--- a/layout/base/nsRefreshDriver.cpp
+++ b/layout/base/nsRefreshDriver.cpp
@@ -21,17 +21,17 @@
 #include <windows.h>
 // mmsystem isn't part of WIN32_LEAN_AND_MEAN, so we have
 // to manually include it
 #include <mmsystem.h>
 #include "WinUtils.h"
 #endif
 
 #include "mozilla/Util.h"
-#include "mozilla/AutoRestore.h"
+
 #include "nsRefreshDriver.h"
 #include "nsITimer.h"
 #include "nsLayoutUtils.h"
 #include "nsPresContext.h"
 #include "nsComponentManagerUtils.h"
 #include "prlog.h"
 #include "nsAutoPtr.h"
 #include "nsIDocument.h"
@@ -680,18 +680,17 @@ nsRefreshDriver::ChooseTimer() const
 
 nsRefreshDriver::nsRefreshDriver(nsPresContext* aPresContext)
   : mActiveTimer(nullptr),
     mPresContext(aPresContext),
     mFrozen(false),
     mThrottled(false),
     mTestControllingRefreshes(false),
     mViewManagerFlushIsPending(false),
-    mRequestedHighPrecision(false),
-    mInRefresh(false)
+    mRequestedHighPrecision(false)
 {
   mMostRecentRefreshEpochTime = JS_Now();
   mMostRecentRefresh = TimeStamp::Now();
 }
 
 nsRefreshDriver::~nsRefreshDriver()
 {
   NS_ABORT_IF_FALSE(ObserverCount() == 0,
@@ -1057,19 +1056,16 @@ nsRefreshDriver::Tick(int64_t aNowEpoch,
     // wait until we get a Notify() call when we have no observers
     // before stopping the timer.
     StopTimer();
     return;
   }
 
   profiler_tracing("Paint", "RD", TRACING_INTERVAL_START);
 
-  AutoRestore<bool> restoreInRefresh(mInRefresh);
-  mInRefresh = true;
-
   /*
    * The timer holds a reference to |this| while calling |Notify|.
    * However, implementations of |WillRefresh| are permitted to destroy
    * the pres context, which will cause our |mPresContext| to become
    * null.  If this happens, we must stop notifying observers.
    */
   for (uint32_t i = 0; i < ArrayLength(mObservers); ++i) {
     ObserverArray::EndLimitedIterator etor(mObservers[i]);
@@ -1219,18 +1215,16 @@ nsRefreshDriver::Tick(int64_t aNowEpoch,
     }
 #endif
   }
 
   for (uint32_t i = 0; i < mPostRefreshObservers.Length(); ++i) {
     mPostRefreshObservers[i]->DidRefresh();
   }
   profiler_tracing("Paint", "RD", TRACING_INTERVAL_END);
-
-  NS_ASSERTION(mInRefresh, "Still in refresh");
 }
 
 /* static */ PLDHashOperator
 nsRefreshDriver::ImageRequestEnumerator(nsISupportsHashKey* aEntry,
                                         void* aUserArg)
 {
   nsCOMArray<imgIContainer>* imagesToRefresh =
     static_cast<nsCOMArray<imgIContainer>*> (aUserArg);
--- a/layout/base/nsRefreshDriver.h
+++ b/layout/base/nsRefreshDriver.h
@@ -244,18 +244,16 @@ public:
 			   mozFlushType aFlushType);
 #endif
 
   /**
    * Default interval the refresh driver uses, in ms.
    */
   static int32_t DefaultInterval();
 
-  bool IsInRefresh() { return mInRefresh; }
-
 private:
   typedef nsTObserverArray<nsARefreshObserver*> ObserverArray;
   typedef nsTHashtable<nsISupportsHashKey> RequestTable;
   struct ImageStartData {
     ImageStartData()
     {
     }
 
@@ -299,17 +297,16 @@ private:
   nsPresContext *mPresContext; // weak; pres context passed in constructor
                                // and unset in Disconnect
 
   bool mFrozen;
   bool mThrottled;
   bool mTestControllingRefreshes;
   bool mViewManagerFlushIsPending;
   bool mRequestedHighPrecision;
-  bool mInRefresh;
 
   int64_t mMostRecentRefreshEpochTime;
   mozilla::TimeStamp mMostRecentRefresh;
 
   // separate arrays for each flush type we support
   ObserverArray mObservers[3];
   RequestTable mRequests;
   ImageStartTable mStartTable;