Bug 1147397 - The null recording checks in get/setTimeInterval are backwards, r=jsantell
authorVictor Porof <vporof@mozilla.com>
Wed, 25 Mar 2015 10:22:20 -0400
changeset 266186 ad9f9f565c3947ddf871acc2392709b32ac78de2
parent 266185 3a604f52306d7a420add1237ff535c5dbface24e
child 266187 37c1fdfd86ba15b53dca42be7c55a8ba5c74407b
push id830
push userraliiev@mozilla.com
push dateFri, 19 Jun 2015 19:24:37 +0000
treeherdermozilla-release@932614382a68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjsantell
bugs1147397
milestone39.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 1147397 - The null recording checks in get/setTimeInterval are backwards, r=jsantell
browser/devtools/performance/views/overview.js
--- a/browser/devtools/performance/views/overview.js
+++ b/browser/devtools/performance/views/overview.js
@@ -94,48 +94,45 @@ let OverviewView = {
 
   /**
    * Sets the time interval selection for all graphs in this overview.
    *
    * @param object interval
    *        The { startTime, endTime }, in milliseconds.
    */
   setTimeInterval: function(interval, options = {}) {
-    if (this.isDisabled()) {
-      return;
-    }
-
     let recording = PerformanceController.getCurrentRecording();
     if (recording == null) {
       throw new Error("A recording should be available in order to set the selection.");
     }
+    if (this.isDisabled()) {
+      return;
+    }
     let mapStart = () => 0;
     let mapEnd = () => recording.getDuration();
     let selection = { start: interval.startTime, end: interval.endTime };
     this._stopSelectionChangeEventPropagation = options.stopPropagation;
     this.markersOverview.setMappedSelection(selection, { mapStart, mapEnd });
     this._stopSelectionChangeEventPropagation = false;
   },
 
   /**
    * Gets the time interval selection for all graphs in this overview.
    *
    * @return object
    *         The { startTime, endTime }, in milliseconds.
    */
   getTimeInterval: function() {
     let recording = PerformanceController.getCurrentRecording();
-
+    if (recording == null) {
+      throw new Error("A recording should be available in order to get the selection.");
+    }
     if (this.isDisabled()) {
       return { startTime: 0, endTime: recording.getDuration() };
     }
-
-    if (recording == null) {
-      throw new Error("A recording should be available in order to get the selection.");
-    }
     let mapStart = () => 0;
     let mapEnd = () => recording.getDuration();
     let selection = this.markersOverview.getMappedSelection({ mapStart, mapEnd });
     return { startTime: selection.min, endTime: selection.max };
   },
 
   /**
    * Sets up the markers overivew graph, if needed.