Bug 1277834 - Add missing promise rejection handler to breadcrumbs; r=jdescottes
authorPatrick Brosset <pbrosset@mozilla.com>
Wed, 20 Jul 2016 10:30:43 +0200
changeset 306131 2ce848f8b804c55792014cd9b70c9a54854bf9d7
parent 306130 91c303acd4a35b47db19c2670013d87269fd953d
child 306132 0c21f0c5a2964f384d37e29f98a7489901741218
push id30478
push usercbook@mozilla.com
push dateFri, 22 Jul 2016 09:54:14 +0000
treeherdermozilla-central@35921a0c3857 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdescottes
bugs1277834
milestone50.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 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);
+      }
     });
   }
 };