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 286419 ca693fb76f9b4b085f6cd25d5f6d067c47fc3b77
parent 286418 8a0c3982f7a1f18235b169935cf5c4889c97c956
child 286420 422b062772d1a57b2fbee4b16020ad90d57341bb
push id218
push userryanvm@gmail.com
push dateWed, 16 Dec 2015 22:58:33 +0000
reviewerspbrosset, test-only
bugs934487
milestone26.0
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
@@ -324,16 +324,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();
       });
     });
   },
 
   _selectionCssSelector: null,