Bug 1450170 - Add Nightly-only observer notification that fires anytime a tab switch spinner is displayed. r?dthayer draft
authorMike Conley <mconley@mozilla.com>
Thu, 29 Mar 2018 22:37:07 -0400
changeset 775109 257938e730564a8fce79319846f4a479fb5a8dc4
parent 774711 8c71359d60e21055074ae8bc3dcb796d20f0cbaf
push id104609
push usermconley@mozilla.com
push dateFri, 30 Mar 2018 02:50:27 +0000
reviewersdthayer
bugs1450170
milestone61.0a1
Bug 1450170 - Add Nightly-only observer notification that fires anytime a tab switch spinner is displayed. r?dthayer MozReview-Commit-ID: 3S34IVb9BEf
browser/modules/AsyncTabSwitcher.jsm
--- a/browser/modules/AsyncTabSwitcher.jsm
+++ b/browser/modules/AsyncTabSwitcher.jsm
@@ -1028,16 +1028,19 @@ class AsyncTabSwitcher {
     TelemetryStopwatch.start("FX_TAB_SWITCH_SPINNER_VISIBLE_MS", this.window);
     // We have a second, similar probe for capturing recordings of
     // when the spinner is displayed for very long periods.
     TelemetryStopwatch.start("FX_TAB_SWITCH_SPINNER_VISIBLE_LONG_MS", this.window);
     this.addMarker("AsyncTabSwitch:SpinnerShown");
     Services.telemetry
       .getHistogramById("FX_TAB_SWITCH_SPINNER_VISIBLE_TRIGGER")
       .add(this._loadTimerClearedBy);
+    if (AppConstants.NIGHTLY_BUILD) {
+      Services.obs.notifyObservers(null, "tabswitch-spinner");
+    }
   }
 
   spinnerHidden() {
     this.assert(this.spinnerTab);
     this.log("DEBUG: spinner time = " +
       TelemetryStopwatch.timeElapsed("FX_TAB_SWITCH_SPINNER_VISIBLE_MS", this.window));
     TelemetryStopwatch.finish("FX_TAB_SWITCH_SPINNER_VISIBLE_MS", this.window);
     TelemetryStopwatch.finish("FX_TAB_SWITCH_SPINNER_VISIBLE_LONG_MS", this.window);