Bug 883600 - Add an isLocal method to the walker. r=paul

--HG--
extra : rebase_source : 62589f32bbf32569b000f5b1557788402cf979e7
This commit is contained in:
Dave Camp 2013-06-10 21:18:43 -07:00
parent 182a158660
commit ca303ce912

View File

@ -1583,10 +1583,14 @@ var WalkerFront = exports.WalkerFront = protocol.FrontClass(WalkerActor, {
this.getMutations({cleanup: this.autoCleanup}).then(null, console.error);
}),
isLocal: function() {
return !!this.conn._transport._serverConnection;
},
// XXX hack during transition to remote inspector: get a proper NodeFront
// for a given local node. Only works locally.
frontForRawNode: function(rawNode){
if (!this.conn._transport._serverConnection) {
if (!this.isLocal()) {
throw Error("Tried to use frontForRawNode on a remote connection.");
}
let walkerActor = this.conn._transport._serverConnection.getActor(this.actorID);