Bug 1277834 - Add missing promise rejection handler to breadcrumbs; r=jdescottes draft
authorPatrick Brosset <pbrosset@mozilla.com>
Wed, 20 Jul 2016 10:30:43 +0200
changeset 390915 afd75f3e560ce77722630005b227649a4b5dc3ba
parent 390914 9b96832c8b0258c4de96c22929e1683d4ccec0d8
child 526088 76e06ebfc021723cc4f06844d4d738559f2bba4d
push id23767
push userpbrosset@mozilla.com
push dateThu, 21 Jul 2016 21:34:46 +0000
reviewersjdescottes
bugs1277834
milestone50.0a1
Bug 1277834 - Add missing promise rejection handler to breadcrumbs; r=jdescottes MozReview-Commit-ID: C7WDd3CsMSX
devtools/client/inspector/breadcrumbs.js
--- a/devtools/client/inspector/breadcrumbs.js
+++ b/devtools/client/inspector/breadcrumbs.js
@@ -881,11 +881,16 @@ HTMLBreadcrumbs.prototype = {
 
     this.updateSelectors();
 
     // Make sure the selected node and its neighbours are visible.
     waitForTick().then(() => {
       this.scroll();
       this.inspector.emit("breadcrumbs-updated", this.selection.nodeFront);
       doneUpdating();
+    }, e => {
+      // Only log this as an error if we haven't been destroyed in the meantime.
+      if (!this.isDestroyed) {
+        console.error(e);
+      }
     });
   }
 };