Bug 1317819 - avoid typeerror when getting debugger frames from webconsole;r=jlast a=jcristau
authorJulian Descottes <jdescottes@mozilla.com>
Tue, 15 Nov 2016 23:31:17 +0100
changeset 352550 36be34c8798ac7bbf7595f6f1eb5865affad9bca
parent 352549 f30fda8d65c4ed42a7a1db27a44202f7fa1d9baa
child 352551 a9646c7ac30f5a8c7f2bdb29e41862b969797d87
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlast, jcristau
bugs1317819
milestone52.0a2
Bug 1317819 - avoid typeerror when getting debugger frames from webconsole;r=jlast a=jcristau MozReview-Commit-ID: 46xtLlqQnfn
devtools/client/debugger/new/panel.js
--- a/devtools/client/debugger/new/panel.js
+++ b/devtools/client/debugger/new/panel.js
@@ -44,18 +44,18 @@ DebuggerPanel.prototype = {
 
   _selectors: function() {
     return this.panelWin.Debugger.selectors;
   },
 
   getFrames: function() {
     let frames = this._selectors().getFrames(this._getState());
 
-    // frames is an empty array when the debugger is not paused
-    if (!frames.toJS) {
+    // frames is null when the debugger is not paused
+    if (!frames) {
       return {
         frames: [],
         selected: -1
       }
     }
 
     frames = frames.toJS();
     const selectedFrame = this._selectors().getSelectedFrame(this._getState());