Bug 1473513 - Backed out changeset 0e431edddacd for failures on mobile/android/tests/browser/chrome/test_debugger_server.html CLOSED TREE

Summary:
MozReview-Commit-ID: 1BlQk4H0c1w

Depends on D6812

Bug #: 1473513

Differential Revision: https://phabricator.services.mozilla.com/D6813
This commit is contained in:
Alexandre Poirot 2018-09-25 19:35:14 +03:00
Родитель 18a737b18d
Коммит e008acf411
4 изменённых файлов: 16 добавлений и 34 удалений

Просмотреть файл

@ -9,7 +9,6 @@
const { Cu } = require("chrome");
const Services = require("Services");
const { ActorPool, appendExtraActors, createExtraActors } = require("devtools/server/actors/common");
const { Pool } = require("devtools/shared/protocol");
const { DebuggerServer } = require("devtools/server/main");
loader.lazyRequireGetter(this, "ChromeWindowTargetActor",
@ -431,18 +430,14 @@ RootActor.prototype = {
workerList.onListChanged = this._onWorkerListChanged;
return workerList.getList().then(actors => {
const pool = new Pool(this.conn);
const pool = new ActorPool(this.conn);
for (const actor of actors) {
pool.manage(actor);
}
// Do not destroy the pool before transfering ownership to the newly created
// pool, so that we do not accidently destroy actors that are still in use.
if (this._workerTargetActorPool) {
this._workerTargetActorPool.destroy();
pool.addActor(actor);
}
this.conn.removeActorPool(this._workerTargetActorPool);
this._workerTargetActorPool = pool;
this.conn.addActorPool(this._workerTargetActorPool);
return {
"from": this.actorID,

Просмотреть файл

@ -41,7 +41,7 @@ const { LocalizationHelper } = require("devtools/shared/l10n");
const STRINGS_URI = "devtools/shared/locales/browsing-context.properties";
const L10N = new LocalizationHelper(STRINGS_URI);
const { ActorClassWithSpec, Actor, Pool } = require("devtools/shared/protocol");
const { ActorClassWithSpec, Actor } = require("devtools/shared/protocol");
const { browsingContextTargetSpec } = require("devtools/shared/specs/targets/browsing-context");
loader.lazyRequireGetter(this, "ThreadActor", "devtools/server/actors/thread", true);
@ -651,18 +651,15 @@ const browsingContextTargetPrototype = {
}
return this._workerTargetActorList.getList().then((actors) => {
const pool = new Pool(this.conn);
const pool = new ActorPool(this.conn);
for (const actor of actors) {
pool.manage(actor);
}
// Do not destroy the pool before transfering ownership to the newly created
// pool, so that we do not accidently destroy actors that are still in use.
if (this._workerTargetActorPool) {
this._workerTargetActorPool.destroy();
pool.addActor(actor);
}
this.conn.removeActorPool(this._workerTargetActorPool);
this._workerTargetActorPool = pool;
this.conn.addActorPool(this._workerTargetActorPool);
this._workerTargetActorList.onListChanged = this._onWorkerTargetActorListChanged;
return {
@ -902,7 +899,7 @@ const browsingContextTargetPrototype = {
}
if (this._workerTargetActorPool !== null) {
this._workerTargetActorPool.destroy();
this.conn.removeActorPool(this._workerTargetActorPool);
this._workerTargetActorPool = null;
}

Просмотреть файл

@ -18,7 +18,6 @@ const { ChromeDebuggerActor } = require("devtools/server/actors/thread");
const { WebConsoleActor } = require("devtools/server/actors/webconsole");
const makeDebugger = require("devtools/server/actors/utils/make-debugger");
const { ActorPool } = require("devtools/server/actors/common");
const { Pool } = require("devtools/shared/protocol");
const { assert } = require("devtools/shared/DevToolsUtils");
const { TabSources } = require("devtools/server/actors/utils/TabSources");
@ -121,18 +120,15 @@ ContentProcessTargetActor.prototype = {
this._workerList = new WorkerTargetActorList(this.conn, {});
}
return this._workerList.getList().then(actors => {
const pool = new Pool(this.conn);
const pool = new ActorPool(this.conn);
for (const actor of actors) {
pool.manage(actor);
}
// Do not destroy the pool before transfering ownership to the newly created
// pool, so that we do not accidently destroy actors that are still in use.
if (this._workerTargetActorPool) {
this._workerTargetActorPool.destroy();
pool.addActor(actor);
}
this.conn.removeActorPool(this._workerTargetActorPool);
this._workerTargetActorPool = pool;
this.conn.addActorPool(this._workerTargetActorPool);
this._workerList.onListChanged = this._onWorkerListChanged;
return {

Просмотреть файл

@ -857,12 +857,6 @@ Pool.prototype = extend(EventEmitter.prototype, {
actor.actorID = this.conn.allocID(actor.actorPrefix || actor.typeName);
}
// If the actor is already in a pool, remove it without destroying it.
const parent = actor.parent();
if (parent) {
parent.unmanage(actor);
}
this._poolMap.set(actor.actorID, actor);
return actor;
},