Bug 881101 - hooks.other is null after shutting down the debugger. r=past

This commit is contained in:
Dave Camp 2013-06-10 21:16:47 -07:00
parent 465d00dbcd
commit b4b2f88a8f

View File

@ -219,13 +219,17 @@ LocalDebuggerTransport.prototype = {
}
this._deepFreeze(aPacket);
let other = this.other;
Services.tm.currentThread.dispatch(makeInfallible(function() {
// Avoid the cost of JSON.stringify() when logging is disabled.
if (wantLogging) {
dumpn("Received packet " + serial + ": " + JSON.stringify(aPacket, null, 2));
}
other.hooks.onPacket(aPacket);
}, "LocalDebuggerTransport instance's this.other.hooks.onPacket"), 0);
if (other) {
Services.tm.currentThread.dispatch(makeInfallible(function() {
// Avoid the cost of JSON.stringify() when logging is disabled.
if (wantLogging) {
dumpn("Received packet " + serial + ": " + JSON.stringify(aPacket, null, 2));
}
if (other.hooks) {
other.hooks.onPacket(aPacket);
}
}, "LocalDebuggerTransport instance's this.other.hooks.onPacket"), 0);
}
},
/**