Bug 934487 - Fix "TypeError: this.markup is undefined" in devtools b-c runs. r=pbrosset, a=test-only
authorBrian Grinstead <bgrinstead@mozilla.com>
Tue, 05 Nov 2013 07:37:55 -0600
changeset 167370 58a25d20bbad22fc38e4f16377d729daecdde52c
parent 167369 eff86a8b533212258ea55338628c650d9c58125c
child 167371 72614b4ccdfa092de4fdd5ebbf6a4b35095e1e03
push id428
push userbbajaj@mozilla.com
push dateTue, 28 Jan 2014 00:16:25 +0000
treeherdermozilla-release@cd72a7ff3a75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspbrosset, test-only
bugs934487
milestone27.0a2
Bug 934487 - Fix "TypeError: this.markup is undefined" in devtools b-c runs. r=pbrosset, a=test-only
browser/devtools/inspector/inspector-panel.js
--- a/browser/devtools/inspector/inspector-panel.js
+++ b/browser/devtools/inspector/inspector-panel.js
@@ -353,16 +353,19 @@ InspectorPanel.prototype = {
     this._getDefaultNodeForSelection().then(defaultNode => {
       if (this._destroyPromise) {
         return;
       }
       this.selection.setNodeFront(defaultNode, "navigateaway");
 
       this._initMarkup();
       this.once("markuploaded", () => {
+        if (this._destroyPromise) {
+          return;
+        }
         this.markup.expandNode(this.selection.nodeFront);
         this.setupSearchBox();
         this.emit("new-root");
       });
     });
   },
 
   _selectionCssSelector: null,