Backed out changeset 73a60f9b3c2f (bug 1275314) for GTest bustage CLOSED TREE
authorWes Kocher <wkocher@mozilla.com>
Fri, 14 Oct 2016 14:52:44 -0700
changeset 425740 df356e7c537e64562a719abe377a5c8871c5f863
parent 425739 afdefb5fc27ef4ed65f08d881fd46456e8ac7be5
child 425741 07c8f7c80bb74c866d9aa1103739fea736f204e3
push id32504
push userbmo:gasolin@mozilla.com
push dateMon, 17 Oct 2016 02:37:54 +0000
bugs1275314
milestone52.0a1
backs out73a60f9b3c2f64768a312327f5c0befd460de446
Backed out changeset 73a60f9b3c2f (bug 1275314) for GTest bustage CLOSED TREE
dom/webidl/CheckerboardReportService.webidl
gfx/ipc/GPUChild.cpp
gfx/ipc/GPUChild.h
gfx/ipc/GPUParent.cpp
gfx/ipc/GPUParent.h
gfx/ipc/GPUProcessManager.cpp
gfx/ipc/GPUProcessManager.h
gfx/ipc/PGPU.ipdl
gfx/layers/apz/src/APZCTreeManager.cpp
gfx/layers/apz/src/APZCTreeManager.h
gfx/layers/apz/src/AsyncPanZoomController.cpp
gfx/layers/apz/src/AsyncPanZoomController.h
gfx/layers/apz/util/CheckerboardReportService.cpp
gfx/layers/apz/util/CheckerboardReportService.h
toolkit/components/aboutcheckerboard/content/aboutCheckerboard.js
toolkit/components/aboutcheckerboard/content/aboutCheckerboard.xhtml
--- a/dom/webidl/CheckerboardReportService.webidl
+++ b/dom/webidl/CheckerboardReportService.webidl
@@ -40,19 +40,9 @@ interface CheckerboardReportService {
    * Gets the state of the apz.record_checkerboarding pref.
    */
   boolean isRecordingEnabled();
 
   /**
    * Sets the state of the apz.record_checkerboarding pref.
    */
   void setRecordingEnabled(boolean aEnabled);
-
-  /**
-   * Flush any in-progress checkerboard reports. Since this happens
-   * asynchronously, the caller may register an observer with the observer
-   * service to be notified when this operation is complete. The observer should
-   * listen for the topic "APZ:FlushActiveCheckerboard:Done". Upon receiving
-   * this notification, the caller may call getReports() to obtain the flushed
-   * reports, along with any other reports that are available.
-   */
-  void flushActiveReports();
 };
--- a/gfx/ipc/GPUChild.cpp
+++ b/gfx/ipc/GPUChild.cpp
@@ -118,27 +118,16 @@ bool
 GPUChild::RecvInitCrashReporter(Shmem&& aShmem)
 {
 #ifdef MOZ_CRASHREPORTER
   mCrashReporter = MakeUnique<ipc::CrashReporterHost>(GeckoProcessType_GPU, aShmem);
 #endif
   return true;
 }
 
-bool
-GPUChild::RecvNotifyUiObservers(const nsCString& aTopic)
-{
-  nsCOMPtr<nsIObserverService> obsSvc = mozilla::services::GetObserverService();
-  MOZ_ASSERT(obsSvc);
-  if (obsSvc) {
-    obsSvc->NotifyObservers(nullptr, aTopic.get(), nullptr);
-  }
-  return true;
-}
-
 void
 GPUChild::ActorDestroy(ActorDestroyReason aWhy)
 {
   if (aWhy == AbnormalShutdown) {
 #ifdef MOZ_CRASHREPORTER
     if (mCrashReporter) {
       mCrashReporter->GenerateCrashReport(OtherPid());
       mCrashReporter = nullptr;
--- a/gfx/ipc/GPUChild.h
+++ b/gfx/ipc/GPUChild.h
@@ -35,17 +35,16 @@ public:
   void OnVarChanged(const GfxVarUpdate& aVar) override;
 
   // PGPUChild overrides.
   bool RecvInitComplete(const GPUDeviceData& aData) override;
   bool RecvReportCheckerboard(const uint32_t& aSeverity, const nsCString& aLog) override;
   bool RecvInitCrashReporter(Shmem&& shmem) override;
   void ActorDestroy(ActorDestroyReason aWhy) override;
   bool RecvGraphicsError(const nsCString& aError) override;
-  bool RecvNotifyUiObservers(const nsCString& aTopic) override;
 
   static void Destroy(UniquePtr<GPUChild>&& aChild);
 
 private:
   GPUProcessHost* mHost;
   UniquePtr<ipc::CrashReporterHost> mCrashReporter;
   bool mGPUReady;
 };
--- a/gfx/ipc/GPUParent.cpp
+++ b/gfx/ipc/GPUParent.cpp
@@ -300,27 +300,16 @@ GPUParent::RecvDeallocateLayerTreeId(con
 
 bool
 GPUParent::RecvAddLayerTreeIdMapping(const uint64_t& aLayersId, const ProcessId& aOwnerId)
 {
   LayerTreeOwnerTracker::Get()->Map(aLayersId, aOwnerId);
   return true;
 }
 
-bool
-GPUParent::RecvNotifyGpuObservers(const nsCString& aTopic)
-{
-  nsCOMPtr<nsIObserverService> obsSvc = mozilla::services::GetObserverService();
-  MOZ_ASSERT(obsSvc);
-  if (obsSvc) {
-    obsSvc->NotifyObservers(nullptr, aTopic.get(), nullptr);
-  }
-  return true;
-}
-
 void
 GPUParent::ActorDestroy(ActorDestroyReason aWhy)
 {
   if (AbnormalShutdown == aWhy) {
     NS_WARNING("Shutting down GPU process early due to a crash!");
     ProcessChild::QuickExit();
   }
 
--- a/gfx/ipc/GPUParent.h
+++ b/gfx/ipc/GPUParent.h
@@ -42,17 +42,16 @@ public:
     const IntSize& aSurfaceSize) override;
   bool RecvNewContentCompositorBridge(Endpoint<PCompositorBridgeParent>&& aEndpoint) override;
   bool RecvNewContentImageBridge(Endpoint<PImageBridgeParent>&& aEndpoint) override;
   bool RecvNewContentVRManager(Endpoint<PVRManagerParent>&& aEndpoint) override;
   bool RecvNewContentVideoDecoderManager(Endpoint<PVideoDecoderManagerParent>&& aEndpoint) override;
   bool RecvDeallocateLayerTreeId(const uint64_t& aLayersId) override;
   bool RecvGetDeviceStatus(GPUDeviceData* aOutStatus) override;
   bool RecvAddLayerTreeIdMapping(const uint64_t& aLayersId, const ProcessId& aOwnerId) override;
-  bool RecvNotifyGpuObservers(const nsCString& aTopic) override;
 
   void ActorDestroy(ActorDestroyReason aWhy) override;
 
 private:
   RefPtr<VsyncBridgeParent> mVsyncBridge;
 };
 
 } // namespace gfx
--- a/gfx/ipc/GPUProcessManager.cpp
+++ b/gfx/ipc/GPUProcessManager.cpp
@@ -735,21 +735,10 @@ GPUProcessManager::AddListener(GPUProces
 }
 
 void
 GPUProcessManager::RemoveListener(GPUProcessListener* aListener)
 {
   mListeners.RemoveElement(aListener);
 }
 
-bool
-GPUProcessManager::NotifyGpuObservers(const char* aTopic)
-{
-  if (!mGPUChild) {
-    return false;
-  }
-  nsCString topic(aTopic);
-  mGPUChild->SendNotifyGpuObservers(topic);
-  return true;
-}
-
 } // namespace gfx
 } // namespace mozilla
--- a/gfx/ipc/GPUProcessManager.h
+++ b/gfx/ipc/GPUProcessManager.h
@@ -123,20 +123,16 @@ public:
 
   // Notify the GPUProcessManager that a top-level PGPU protocol has been
   // terminated. This may be called from any thread.
   void NotifyRemoteActorDestroyed(const uint64_t& aProcessToken);
 
   void AddListener(GPUProcessListener* aListener);
   void RemoveListener(GPUProcessListener* aListener);
 
-  // Send a message to the GPU process observer service to broadcast. Returns
-  // true if the message was sent, false if not.
-  bool NotifyGpuObservers(const char* aTopic);
-
   // Returns access to the PGPU protocol if a GPU process is present.
   GPUChild* GetGPUChild() {
     return mGPUChild;
   }
 
 private:
   // Called from our xpcom-shutdown observer.
   void OnXPCOMShutdown();
--- a/gfx/ipc/PGPU.ipdl
+++ b/gfx/ipc/PGPU.ipdl
@@ -63,32 +63,24 @@ parent:
 
   // Called to notify the GPU process of who owns a layersId.
   sync AddLayerTreeIdMapping(uint64_t layersId, ProcessId ownerId);
 
   // Request the current DeviceStatus from the GPU process. This blocks until
   // one is available (i.e., Init has completed).
   sync GetDeviceStatus() returns (GPUDeviceData status);
 
-  // Have a message be broadcasted to the GPU process by the GPU process
-  // observer service.
-  async NotifyGpuObservers(nsCString aTopic);
-
 child:
   // Sent when the GPU process has initialized devices. This occurs once, after
   // Init().
   async InitComplete(GPUDeviceData data);
 
   // Sent when APZ detects checkerboarding and apz checkerboard reporting is enabled.
   async ReportCheckerboard(uint32_t severity, nsCString log);
 
   // Graphics errors, analogous to PContent::GraphicsError
   async GraphicsError(nsCString aError);
 
   async InitCrashReporter(Shmem shmem);
-
-  // Have a message be broadcasted to the UI process by the UI process
-  // observer service.
-  async NotifyUiObservers(nsCString aTopic);
 };
 
 } // namespace gfx
 } // namespace mozilla
--- a/gfx/layers/apz/src/APZCTreeManager.cpp
+++ b/gfx/layers/apz/src/APZCTreeManager.cpp
@@ -9,17 +9,16 @@
 #include "Compositor.h"                 // for Compositor
 #include "DragTracker.h"                // for DragTracker
 #include "gfxPrefs.h"                   // for gfxPrefs
 #include "HitTestingTreeNode.h"         // for HitTestingTreeNode
 #include "InputBlockState.h"            // for InputBlockState
 #include "InputData.h"                  // for InputData, etc
 #include "Layers.h"                     // for Layer, etc
 #include "mozilla/dom/Touch.h"          // for Touch
-#include "mozilla/gfx/GPUParent.h"      // for GPUParent
 #include "mozilla/gfx/Logging.h"        // for gfx::TreeLog
 #include "mozilla/gfx/Point.h"          // for Point
 #include "mozilla/layers/APZThreadUtils.h"  // for AssertOnCompositorThread, etc
 #include "mozilla/layers/AsyncCompositionManager.h" // for ViewTransform
 #include "mozilla/layers/AsyncDragMetrics.h" // for AsyncDragMetrics
 #include "mozilla/layers/CompositorBridgeParent.h" // for CompositorBridgeParent, etc
 #include "mozilla/layers/LayerMetricsWrapper.h"
 #include "mozilla/MouseEvents.h"
@@ -80,102 +79,31 @@ struct APZCTreeManager::TreeBuildingStat
   nsTArray<RefPtr<HitTestingTreeNode>> mNodesToDestroy;
 
   // This map is populated as we place APZCs into the new tree. Its purpose is
   // to facilitate re-using the same APZC for different layers that scroll
   // together (and thus have the same ScrollableLayerGuid).
   std::map<ScrollableLayerGuid, AsyncPanZoomController*> mApzcMap;
 };
 
-class APZCTreeManager::CheckerboardFlushObserver : public nsIObserver {
-public:
-  NS_DECL_ISUPPORTS
-  NS_DECL_NSIOBSERVER
-
-  explicit CheckerboardFlushObserver(APZCTreeManager* aTreeManager)
-    : mTreeManager(aTreeManager)
-  {
-    MOZ_ASSERT(NS_IsMainThread());
-    nsCOMPtr<nsIObserverService> obsSvc = mozilla::services::GetObserverService();
-    MOZ_ASSERT(obsSvc);
-    if (obsSvc) {
-      obsSvc->AddObserver(this, "APZ:FlushActiveCheckerboard", false);
-    }
-  }
-
-  void Unregister()
-  {
-    MOZ_ASSERT(NS_IsMainThread());
-    nsCOMPtr<nsIObserverService> obsSvc = mozilla::services::GetObserverService();
-    if (obsSvc) {
-      obsSvc->RemoveObserver(this, "APZ:FlushActiveCheckerboard");
-    }
-    mTreeManager = nullptr;
-  }
-
-protected:
-  virtual ~CheckerboardFlushObserver() {}
-
-private:
-  RefPtr<APZCTreeManager> mTreeManager;
-};
-
-NS_IMPL_ISUPPORTS(APZCTreeManager::CheckerboardFlushObserver, nsIObserver)
-
-NS_IMETHODIMP
-APZCTreeManager::CheckerboardFlushObserver::Observe(nsISupports* aSubject,
-                                                    const char* aTopic,
-                                                    const char16_t*)
-{
-  MOZ_ASSERT(NS_IsMainThread());
-  MOZ_ASSERT(mTreeManager.get());
-
-  MutexAutoLock lock(mTreeManager->mTreeLock);
-  if (mTreeManager->mRootNode) {
-    ForEachNode<ReverseIterator>(mTreeManager->mRootNode.get(),
-        [](HitTestingTreeNode* aNode)
-        {
-          if (aNode->IsPrimaryHolder()) {
-            MOZ_ASSERT(aNode->GetApzc());
-            aNode->GetApzc()->FlushActiveCheckerboardReport();
-          }
-        });
-  }
-  if (XRE_IsGPUProcess()) {
-    if (gfx::GPUParent* gpu = gfx::GPUParent::GetSingleton()) {
-      nsCString topic("APZ:FlushActiveCheckerboard:Done");
-      Unused << gpu->SendNotifyUiObservers(topic);
-    }
-  } else {
-    MOZ_ASSERT(XRE_IsParentProcess());
-    nsCOMPtr<nsIObserverService> obsSvc = mozilla::services::GetObserverService();
-    if (obsSvc) {
-      obsSvc->NotifyObservers(nullptr, "APZ:FlushActiveCheckerboard:Done", nullptr);
-    }
-  }
-  return NS_OK;
-}
-
-
 /*static*/ const ScreenMargin
 APZCTreeManager::CalculatePendingDisplayPort(
   const FrameMetrics& aFrameMetrics,
   const ParentLayerPoint& aVelocity)
 {
   return AsyncPanZoomController::CalculatePendingDisplayPort(
     aFrameMetrics, aVelocity);
 }
 
 APZCTreeManager::APZCTreeManager()
     : mInputQueue(new InputQueue()),
       mTreeLock("APZCTreeLock"),
       mHitResultForInputBlock(HitNothing),
       mRetainedTouchIdentifier(-1),
-      mApzcTreeLog("apzctree"),
-      mFlushObserver(new CheckerboardFlushObserver(this))
+      mApzcTreeLog("apzctree")
 {
   AsyncPanZoomController::InitializeGlobalState();
   mApzcTreeLog.ConditionOnPrefFunction(gfxPrefs::APZPrintTree);
 }
 
 APZCTreeManager::~APZCTreeManager()
 {
 }
@@ -1342,22 +1270,16 @@ APZCTreeManager::ClearTree()
       {
         nodesToDestroy.AppendElement(aNode);
       });
 
   for (size_t i = 0; i < nodesToDestroy.Length(); i++) {
     nodesToDestroy[i]->Destroy();
   }
   mRootNode = nullptr;
-
-  RefPtr<APZCTreeManager> self(this);
-  NS_DispatchToMainThread(NS_NewRunnableFunction([self] {
-    self->mFlushObserver->Unregister();
-    self->mFlushObserver = nullptr;
-  }));
 }
 
 RefPtr<HitTestingTreeNode>
 APZCTreeManager::GetRootNode() const
 {
   MutexAutoLock lock(mTreeLock);
   return mRootNode;
 }
--- a/gfx/layers/apz/src/APZCTreeManager.h
+++ b/gfx/layers/apz/src/APZCTreeManager.h
@@ -237,20 +237,20 @@ public:
    * documentation on AsyncPanZoomController::AdjustScrollForSurfaceShift for
    * some more details. This is only currently needed due to surface shifts
    * caused by the dynamic toolbar on Android.
    */
   void AdjustScrollForSurfaceShift(const ScreenPoint& aShift) override;
 
   /**
    * Calls Destroy() on all APZC instances attached to the tree, and resets the
-   * tree back to empty. This function must be called exactly once during the
-   * lifetime of this APZCTreeManager, when this APZCTreeManager is no longer
-   * needed. Failing to call this function may prevent objects from being freed
-   * properly.
+   * tree back to empty. This function may be called multiple times during the
+   * lifetime of this APZCTreeManager, but it must always be called at least once
+   * when this APZCTreeManager is no longer needed. Failing to call this function
+   * may prevent objects from being freed properly.
    */
   void ClearTree();
 
   /**
    * Tests if a screen point intersect an apz in the tree.
    */
   bool HitTestAPZC(const ScreenIntPoint& aPoint);
 
@@ -513,19 +513,15 @@ private:
   int32_t mRetainedTouchIdentifier;
   /* Tracks the number of touch points we are tracking that are currently on
    * the screen. */
   TouchCounter mTouchCounter;
   /* For logging the APZC tree for debugging (enabled by the apz.printtree
    * pref). */
   gfx::TreeLog mApzcTreeLog;
 
-  class CheckerboardFlushObserver;
-  friend class CheckerboardFlushObserver;
-  RefPtr<CheckerboardFlushObserver> mFlushObserver;
-
   static float sDPI;
 };
 
 } // namespace layers
 } // namespace mozilla
 
 #endif // mozilla_layers_PanZoomController_h
--- a/gfx/layers/apz/src/AsyncPanZoomController.cpp
+++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp
@@ -3236,55 +3236,39 @@ AsyncPanZoomController::ReportCheckerboa
   MutexAutoLock lock(mCheckerboardEventLock);
   if (!mCheckerboardEvent && (recordTrace || forTelemetry)) {
     mCheckerboardEvent = MakeUnique<CheckerboardEvent>(recordTrace);
   }
   mPotentialCheckerboardTracker.InTransform(IsTransformingState(mState));
   if (magnitude) {
     mPotentialCheckerboardTracker.CheckerboardSeen();
   }
-  UpdateCheckerboardEvent(lock, magnitude);
-}
-
-void
-AsyncPanZoomController::UpdateCheckerboardEvent(const MutexAutoLock& aProofOfLock,
-                                                uint32_t aMagnitude)
-{
-  if (mCheckerboardEvent && mCheckerboardEvent->RecordFrameInfo(aMagnitude)) {
+  if (mCheckerboardEvent && mCheckerboardEvent->RecordFrameInfo(magnitude)) {
     // This checkerboard event is done. Report some metrics to telemetry.
     mozilla::Telemetry::Accumulate(mozilla::Telemetry::CHECKERBOARD_SEVERITY,
       mCheckerboardEvent->GetSeverity());
     mozilla::Telemetry::Accumulate(mozilla::Telemetry::CHECKERBOARD_PEAK,
       mCheckerboardEvent->GetPeak());
     mozilla::Telemetry::Accumulate(mozilla::Telemetry::CHECKERBOARD_DURATION,
       (uint32_t)mCheckerboardEvent->GetDuration().ToMilliseconds());
 
     mPotentialCheckerboardTracker.CheckerboardDone();
 
-    if (gfxPrefs::APZRecordCheckerboarding()) {
+    if (recordTrace) {
       // if the pref is enabled, also send it to the storage class. it may be
       // chosen for public display on about:checkerboard, the hall of fame for
       // checkerboard events.
       uint32_t severity = mCheckerboardEvent->GetSeverity();
       std::string log = mCheckerboardEvent->GetLog();
       CheckerboardEventStorage::Report(severity, log);
     }
     mCheckerboardEvent = nullptr;
   }
 }
 
-void
-AsyncPanZoomController::FlushActiveCheckerboardReport()
-{
-  MutexAutoLock lock(mCheckerboardEventLock);
-  // Pretend like we got a frame with 0 pixels checkerboarded. This will
-  // terminate the checkerboard event and flush it out
-  UpdateCheckerboardEvent(lock, 0);
-}
-
 bool AsyncPanZoomController::IsCurrentlyCheckerboarding() const {
   ReentrantMonitorAutoEnter lock(mMonitor);
 
   if (!gfxPrefs::APZAllowCheckerboarding() || mScrollMetadata.IsApzForceDisabled()) {
     return false;
   }
 
   CSSPoint currentScrollOffset = mFrameMetrics.GetScrollOffset() + mTestAsyncScrollOffset;
--- a/gfx/layers/apz/src/AsyncPanZoomController.h
+++ b/gfx/layers/apz/src/AsyncPanZoomController.h
@@ -230,25 +230,16 @@ public:
   uint32_t GetCheckerboardMagnitude() const;
 
   /**
    * Report the number of CSSPixel-milliseconds of checkerboard to telemetry.
    */
   void ReportCheckerboard(const TimeStamp& aSampleTime);
 
   /**
-   * Flush any active checkerboard report that's in progress. This basically
-   * pretends like any in-progress checkerboard event has terminated, and pushes
-   * out the report to the checkerboard reporting service and telemetry. If the
-   * checkerboard event has not really finished, it will start a new event
-   * on the next composite.
-   */
-  void FlushActiveCheckerboardReport();
-
-  /**
    * Returns whether or not the APZC is currently in a state of checkerboarding.
    * This is a simple computation based on the last-painted content and whether
    * the async transform has pushed it so far that it doesn't fully contain the
    * composition bounds.
    */
   bool IsCurrentlyCheckerboarding() const;
 
   /**
@@ -1171,20 +1162,16 @@ private:
   bool mAsyncTransformAppliedToContent;
 
 
   /* ===================================================================
    * The functions and members in this section are used for checkerboard
    * recording.
    */
 private:
-  // Helper function to update the in-progress checkerboard event, if any.
-  void UpdateCheckerboardEvent(const MutexAutoLock& aProofOfLock,
-                               uint32_t aMagnitude);
-
   // Mutex protecting mCheckerboardEvent
   Mutex mCheckerboardEventLock;
   // This is created when this APZC instance is first included as part of a
   // composite. If a checkerboard event takes place, this is destroyed at the
   // end of the event, and a new one is created on the next composite.
   UniquePtr<CheckerboardEvent> mCheckerboardEvent;
   // This is used to track the total amount of time that we could reasonably
   // be checkerboarding. Combined with other info, this allows us to meaningfully
--- a/gfx/layers/apz/util/CheckerboardReportService.cpp
+++ b/gfx/layers/apz/util/CheckerboardReportService.cpp
@@ -8,17 +8,16 @@
 #include "gfxPrefs.h" // for gfxPrefs
 #include "jsapi.h" // for JS_Now
 #include "MainThreadUtils.h" // for NS_IsMainThread
 #include "mozilla/Assertions.h" // for MOZ_ASSERT
 #include "mozilla/ClearOnShutdown.h" // for ClearOnShutdown
 #include "mozilla/Unused.h"
 #include "mozilla/dom/CheckerboardReportServiceBinding.h" // for dom::CheckerboardReports
 #include "mozilla/gfx/GPUParent.h"
-#include "mozilla/gfx/GPUProcessManager.h"
 #include "nsContentUtils.h" // for nsContentUtils
 #include "nsXULAppAPI.h"
 
 namespace mozilla {
 namespace layers {
 
 /*static*/ StaticRefPtr<CheckerboardEventStorage> CheckerboardEventStorage::sInstance;
 
@@ -203,26 +202,10 @@ CheckerboardReportService::IsRecordingEn
 }
 
 void
 CheckerboardReportService::SetRecordingEnabled(bool aEnabled)
 {
   gfxPrefs::SetAPZRecordCheckerboarding(aEnabled);
 }
 
-void
-CheckerboardReportService::FlushActiveReports()
-{
-  MOZ_ASSERT(XRE_IsParentProcess());
-  gfx::GPUProcessManager* gpu = gfx::GPUProcessManager::Get();
-  if (gpu && gpu->NotifyGpuObservers("APZ:FlushActiveCheckerboard")) {
-    return;
-  }
-
-  nsCOMPtr<nsIObserverService> obsSvc = mozilla::services::GetObserverService();
-  MOZ_ASSERT(obsSvc);
-  if (obsSvc) {
-    obsSvc->NotifyObservers(nullptr, "APZ:FlushActiveCheckerboard", nullptr);
-  }
-}
-
 } // namespace dom
 } // namespace mozilla
--- a/gfx/layers/apz/util/CheckerboardReportService.h
+++ b/gfx/layers/apz/util/CheckerboardReportService.h
@@ -125,17 +125,16 @@ public:
 
 public:
   /*
    * The methods exposed via the webidl.
    */
   void GetReports(nsTArray<dom::CheckerboardReport>& aOutReports);
   bool IsRecordingEnabled() const;
   void SetRecordingEnabled(bool aEnabled);
-  void FlushActiveReports();
 
 private:
   virtual ~CheckerboardReportService() {}
 
   nsCOMPtr<nsISupports> mParent;
 };
 
 } // namespace dom
--- a/toolkit/components/aboutcheckerboard/content/aboutCheckerboard.js
+++ b/toolkit/components/aboutcheckerboard/content/aboutCheckerboard.js
@@ -35,20 +35,16 @@ function updateEnabled() {
   }
 }
 
 function toggleEnabled() {
   service.setRecordingEnabled(!service.isRecordingEnabled());
   updateEnabled();
 }
 
-function flushReports() {
-  service.flushActiveReports();
-}
-
 function showReport(index) {
   trace.value = reports[index].log;
   loadData();
 }
 
 // -- Code to load and render the trace --
 
 const CANVAS_USE_RATIO = 0.75;
--- a/toolkit/components/aboutcheckerboard/content/aboutCheckerboard.xhtml
+++ b/toolkit/components/aboutcheckerboard/content/aboutCheckerboard.xhtml
@@ -9,18 +9,16 @@
   <meta name="viewport" content="width=device-width"/>
   <link rel="stylesheet" href="chrome://global/content/aboutCheckerboard.css" type="text/css"/>
   <script type="text/javascript;version=1.8" src="chrome://global/content/aboutCheckerboard.js"></script>
  </head>
 
  <body onload="onLoad()">
   <p>Checkerboard recording is <span id="enabled" style="color: red">undetermined</span>.
      <button onclick="toggleEnabled()">Toggle it!</button>.</p>
-  <p>If there are active reports in progress, you can stop and flush them by clicking here:
-     <button onclick="flushReports()">Flush active reports</button></p>
   <table class="listing" cellspacing="0">
    <tr>
     <th>Most severe checkerboarding reports</th>
     <th>Most recent checkerboarding reports</th>
    </tr>
    <tr>
     <td><ul id="severe"></ul></td>
     <td><ul id="recent"></ul></td>