mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 08:12:05 +00:00
Bug 1049835 - Don't require actor clients to have a detach method. r=ochameau
This commit is contained in:
parent
9894feff1b
commit
931b838202
@ -295,7 +295,6 @@ function MonitorClient(client, form) {
|
||||
MonitorClient.prototype.destroy = function () {
|
||||
this.client.unregisterClient(this);
|
||||
}
|
||||
MonitorClient.prototype.detach = function () {}
|
||||
MonitorClient.prototype.start = function () {
|
||||
this.client.request({
|
||||
to: this.actor,
|
||||
|
@ -420,7 +420,11 @@ DebuggerClient.prototype = {
|
||||
this._transport = null;
|
||||
return;
|
||||
}
|
||||
client.detach(detachClients);
|
||||
if (client.detach) {
|
||||
client.detach(detachClients);
|
||||
return;
|
||||
}
|
||||
detachClients();
|
||||
};
|
||||
detachClients();
|
||||
},
|
||||
@ -1008,13 +1012,9 @@ DebuggerClient.prototype = {
|
||||
}
|
||||
if (client.events.length > 0 && typeof(client.emit) != "function") {
|
||||
throw new Error("DebuggerServer.registerClient expects " +
|
||||
"client instances with non-empty `events` array to" +
|
||||
"a client instance with non-empty `events` array to" +
|
||||
"have an `emit` function.");
|
||||
}
|
||||
if (typeof(client.detach) != "function") {
|
||||
throw new Error("DebuggerServer.registerClient expects " +
|
||||
"a client instance with a `detach` function.");
|
||||
}
|
||||
if (this._clients.has(actorID)) {
|
||||
throw new Error("DebuggerServer.registerClient already registered " +
|
||||
"a client for this actor.");
|
||||
|
@ -27,7 +27,6 @@ function run_test()
|
||||
MonitorClient.prototype.destroy = function () {
|
||||
client.unregisterClient(this);
|
||||
}
|
||||
MonitorClient.prototype.detach = function () {}
|
||||
MonitorClient.prototype.start = function (callback) {
|
||||
this.client.request({
|
||||
to: this.actor,
|
||||
|
Loading…
Reference in New Issue
Block a user