Bug 883601 - Downgrade exceptions to warning when accessing rawNode on an inspector front. r=paul

--HG--
extra : rebase_source : bd170c4a9d32a6ffb4031e9c09658d2892dbb445
This commit is contained in:
Dave Camp 2013-06-10 21:18:43 -07:00
parent ecac128177
commit a522abf020

View File

@ -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) {