Bug 1193747 - Remove link to inspector error in Browser Console. r=pbro draft
authorJ. Ryan Stinnett <jryans@gmail.com>
Thu, 19 May 2016 16:18:38 -0500
changeset 368959 4ef8fb9f01ba85d3e315e2f0d32c8f3cc383eecc
parent 368958 a3eb9950fa4bfbdb8d8a84f7b5ba09f6b2e08e35
child 521403 34c786d7e3a8b2bd89a069dc49a285229cb82d23
push id18672
push userbmo:jryans@gmail.com
push dateThu, 19 May 2016 21:19:17 +0000
reviewerspbro
bugs1193747
milestone49.0a1
Bug 1193747 - Remove link to inspector error in Browser Console. r=pbro MozReview-Commit-ID: 1ek1pIFeKg2
devtools/client/webconsole/console-output.js
--- a/devtools/client/webconsole/console-output.js
+++ b/devtools/client/webconsole/console-output.js
@@ -3256,18 +3256,18 @@ Widgets.ObjectRenderers.add({
       throw new Error("The object cannot be linked to the inspector as it " +
         "isn't an element node");
     }
 
     // Checking the presence of a toolbox
     let target = this.message.output.toolboxTarget;
     this.toolbox = gDevTools.getToolbox(target);
     if (!this.toolbox) {
-      throw new Error("The object cannot be linked to the inspector without a " +
-        "toolbox");
+      // In cases like the browser console, there is no toolbox.
+      return;
     }
 
     // Checking that the inspector supports the node
     yield this.toolbox.initInspector();
     this._nodeFront = yield this.toolbox.walker.getNodeActorFromObjectActor(this.objectActor.actor);
     if (!this._nodeFront) {
       throw new Error("The object cannot be linked to the inspector, the " +
         "corresponding nodeFront could not be found");