mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 21:05:36 +00:00
Bug 1485660 - Adapt DebuggerClient._pools to accept Front's and (now) Pool's. r=jdescottes
MozReview-Commit-ID: EWka8fMBcK5 Depends on D7462 Differential Revision: https://phabricator.services.mozilla.com/D8518 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
235c66815f
commit
4b85a3b27f
@ -29,6 +29,7 @@ loader.lazyRequireGetter(this, "ThreadClient", "devtools/shared/client/thread-cl
|
||||
loader.lazyRequireGetter(this, "WorkerClient", "devtools/shared/client/worker-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);
|
||||
|
||||
// Retrieve the major platform version, i.e. if we are on Firefox 64.0a1, it will be 64.
|
||||
const PLATFORM_MAJOR_VERSION = AppConstants.MOZ_APP_VERSION.match(/\d+/)[0];
|
||||
@ -1046,7 +1047,11 @@ DebuggerClient.prototype = {
|
||||
// fronts, forming a tree. Descend through all the pools to locate all child fronts.
|
||||
while (poolsToVisit.length) {
|
||||
const pool = poolsToVisit.shift();
|
||||
fronts.add(pool);
|
||||
// `_pools` contains either Front's or Pool's, we only want to collect Fronts here.
|
||||
// Front inherits from Pool which exposes `poolChildren`.
|
||||
if (pool instanceof Front) {
|
||||
fronts.add(pool);
|
||||
}
|
||||
for (const child of pool.poolChildren()) {
|
||||
poolsToVisit.push(child);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user