Bug 1270628 - Stop using content-child-shutdown observer in nsPerformanceStats (r=Yoric)
authorBill McCloskey <billm@mozilla.com>
Thu, 05 May 2016 13:28:48 -0700
changeset 338415 d9db24868efdf51ed6b518d7befe6a124c23d6a3
parent 338414 577123ff73d3104f3979c123ccfbcc0303a20541
child 338416 9c3411213ac7e9fec81f44c97655dfa4ea814eb9
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersYoric
bugs1270628
milestone49.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 1270628 - Stop using content-child-shutdown observer in nsPerformanceStats (r=Yoric)
toolkit/components/perfmonitoring/nsPerformanceStats.cpp
--- a/toolkit/components/perfmonitoring/nsPerformanceStats.cpp
+++ b/toolkit/components/perfmonitoring/nsPerformanceStats.cpp
@@ -706,17 +706,16 @@ nsPerformanceStatsService::Dispose()
   mIsAvailable = false;
 
   // Disconnect from nsIObserverService.
   nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
   if (obs) {
     obs->RemoveObserver(this, "profile-before-change");
     obs->RemoveObserver(this, "quit-application");
     obs->RemoveObserver(this, "quit-application-granted");
-    obs->RemoveObserver(this, "content-child-shutdown");
     obs->RemoveObserver(this, "xpcom-will-shutdown");
   }
 
   // Clear up and disconnect from JSAPI.
   js::DisposePerformanceMonitoring(mRuntime);
 
   mozilla::Unused << js::SetStopwatchIsMonitoringCPOW(mRuntime, false);
   mozilla::Unused << js::SetStopwatchIsMonitoringJank(mRuntime, false);
@@ -779,17 +778,16 @@ nsPerformanceStatsService::InitInternal(
   // Make sure that we release everything during shutdown.
   // We are a bit defensive here, as we know that some strange behavior can break the
   // regular shutdown order.
   nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
   if (obs) {
     obs->AddObserver(this, "profile-before-change", false);
     obs->AddObserver(this, "quit-application-granted", false);
     obs->AddObserver(this, "quit-application", false);
-    obs->AddObserver(this, "content-child-shutdown", false);
     obs->AddObserver(this, "xpcom-will-shutdown", false);
   }
 
   // Connect to JSAPI.
   if (!js::SetStopwatchStartCallback(mRuntime, StopwatchStartCallback, this)) {
     return NS_ERROR_UNEXPECTED;
   }
   if (!js::SetStopwatchCommitCallback(mRuntime, StopwatchCommitCallback, this)) {
@@ -808,17 +806,16 @@ nsPerformanceStatsService::InitInternal(
 // Observe shutdown events.
 NS_IMETHODIMP
 nsPerformanceStatsService::Observe(nsISupports *aSubject, const char *aTopic,
                                    const char16_t *aData)
 {
   MOZ_ASSERT(strcmp(aTopic, "profile-before-change") == 0
              || strcmp(aTopic, "quit-application") == 0
              || strcmp(aTopic, "quit-application-granted") == 0
-             || strcmp(aTopic, "content-child-shutdown") == 0
              || strcmp(aTopic, "xpcom-will-shutdown") == 0);
 
   Dispose();
   return NS_OK;
 }
 
 /*static*/ bool
 nsPerformanceStatsService::IsHandlingUserInput() {