зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1520835 - Removed now-useless front pool from DebuggerClient. r=jdescottes
Depends on D20704 Differential Revision: https://phabricator.services.mozilla.com/D20705 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
252ea7758f
Коммит
f439c41435
|
@ -22,7 +22,6 @@ loader.lazyRequireGetter(this, "EventEmitter", "devtools/shared/event-emitter");
|
||||||
loader.lazyRequireGetter(this, "RootFront", "devtools/shared/fronts/root", true);
|
loader.lazyRequireGetter(this, "RootFront", "devtools/shared/fronts/root", true);
|
||||||
loader.lazyRequireGetter(this, "ThreadClient", "devtools/shared/client/thread-client");
|
loader.lazyRequireGetter(this, "ThreadClient", "devtools/shared/client/thread-client");
|
||||||
loader.lazyRequireGetter(this, "ObjectClient", "devtools/shared/client/object-client");
|
loader.lazyRequireGetter(this, "ObjectClient", "devtools/shared/client/object-client");
|
||||||
loader.lazyRequireGetter(this, "Pool", "devtools/shared/protocol", true);
|
|
||||||
loader.lazyRequireGetter(this, "Front", "devtools/shared/protocol", true);
|
loader.lazyRequireGetter(this, "Front", "devtools/shared/protocol", true);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -38,16 +37,6 @@ function DebuggerClient(transport) {
|
||||||
// To be removed once all clients are refactored to protocol.js
|
// To be removed once all clients are refactored to protocol.js
|
||||||
this._clients = new Map();
|
this._clients = new Map();
|
||||||
|
|
||||||
// Pool of fronts instanciated by this class.
|
|
||||||
// This is useful for actors that have already been transitioned to protocol.js
|
|
||||||
// Once RootClient becomes a protocol.js actor, these actors can be attached to it
|
|
||||||
// instead of this pool.
|
|
||||||
// This Pool will automatically be added to this._pools via addActorPool once the first
|
|
||||||
// Front will be added to it (in attachTarget, ...).
|
|
||||||
// And it does not need to destroyed explicitly as all Pools are destroyed on client
|
|
||||||
// closing.
|
|
||||||
this._frontPool = new Pool(this);
|
|
||||||
|
|
||||||
this._pendingRequests = new Map();
|
this._pendingRequests = new Map();
|
||||||
this._activeRequests = new Map();
|
this._activeRequests = new Map();
|
||||||
this._eventsEnabled = true;
|
this._eventsEnabled = true;
|
||||||
|
@ -64,7 +53,11 @@ function DebuggerClient(transport) {
|
||||||
this.mainRoot = null;
|
this.mainRoot = null;
|
||||||
this.expectReply("root", (packet) => {
|
this.expectReply("root", (packet) => {
|
||||||
this.mainRoot = new RootFront(this, packet);
|
this.mainRoot = new RootFront(this, packet);
|
||||||
this._frontPool.manage(this.mainRoot);
|
|
||||||
|
// Root Front is a special case, managing itself as it doesn't have any parent.
|
||||||
|
// It will register itself to DebuggerClient as a Pool via Front._poolMap.
|
||||||
|
this.mainRoot.manage(this.mainRoot);
|
||||||
|
|
||||||
this.emit("connected", packet.applicationType, packet.traits);
|
this.emit("connected", packet.applicationType, packet.traits);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче