From 87c72a0da7a62cb47f9f87ca33b4836d0182064f Mon Sep 17 00:00:00 2001 From: Dave Camp Date: Mon, 10 Jun 2013 21:18:43 -0700 Subject: [PATCH] Bug 883601 - Downgrade exceptions to warning when accessing rawNode on an inspector front. r=paul --HG-- extra : rebase_source : bd170c4a9d32a6ffb4031e9c09658d2892dbb445 --- toolkit/devtools/server/actors/inspector.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/toolkit/devtools/server/actors/inspector.js b/toolkit/devtools/server/actors/inspector.js index 3024dd94e30..ae11068fd44 100644 --- a/toolkit/devtools/server/actors/inspector.js +++ b/toolkit/devtools/server/actors/inspector.js @@ -405,11 +405,14 @@ let NodeFront = protocol.FrontClass(NodeActor, { */ rawNode: function(rawNode) { if (!this.conn._transport._serverConnection) { - throw new Error("Tried to use rawNode on a remote connection."); + console.warn("Tried to use rawNode on a remote connection."); + return null; } let actor = this.conn._transport._serverConnection.getActor(this.actorID); if (!actor) { - throw new Error("Could not find client side for actor " + this.actorID); + // Can happen if we try to get the raw node for an already-expired + // actor. + return null; } return actor.rawNode; } @@ -1591,7 +1594,8 @@ var WalkerFront = exports.WalkerFront = protocol.FrontClass(WalkerActor, { // for a given local node. Only works locally. frontForRawNode: function(rawNode){ if (!this.isLocal()) { - throw Error("Tried to use frontForRawNode on a remote connection."); + console.warn("Tried to use frontForRawNode on a remote connection."); + return null; } let walkerActor = this.conn._transport._serverConnection.getActor(this.actorID); if (!walkerActor) {