Bug 1157523 - Fix intermittent where markers are selected in the waterfall views when there is no recording selected. r=vp
authorJordan Santell <jsantell@gmail.com>
Thu, 30 Apr 2015 16:03:43 -0700
changeset 273246 7b22dbb2e7d6f8e08884ab108570e0db8ba9a4f0
parent 273245 211fa8dd7c249d5750b75d5fd1476bf3e585d386
child 273247 55826466dd7b4a11186b0efc3395db5c94ce87a8
push id863
push userraliiev@mozilla.com
push dateMon, 03 Aug 2015 13:22:43 +0000
treeherdermozilla-release@f6321b14228d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvp
bugs1157523
milestone40.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 1157523 - Fix intermittent where markers are selected in the waterfall views when there is no recording selected. r=vp
browser/devtools/performance/views/details-waterfall.js
--- a/browser/devtools/performance/views/details-waterfall.js
+++ b/browser/devtools/performance/views/details-waterfall.js
@@ -69,16 +69,21 @@ let WaterfallView = Heritage.extend(Deta
   },
 
   /**
    * Called when a marker is selected in the waterfall view,
    * updating the markers detail view.
    */
   _onMarkerSelected: function (event, marker) {
     let recording = PerformanceController.getCurrentRecording();
+    // Race condition in tests due to lazy rendering of markers in the
+    // waterfall? intermittent bug 1157523
+    if (!recording) {
+      return;
+    }
     let frames = recording.getFrames();
 
     if (event === "selected") {
       this.details.render({ toolbox: gToolbox, marker, frames });
     }
     if (event === "unselected") {
       this.details.empty();
     }