Backed out changeset 4aa0213b5603 (bug 1602468) for dt failures on framework/toolbox.js . CLOSED TREE

This commit is contained in:
Narcis Beleuzu 2020-03-24 23:41:31 +02:00
Родитель dbac585790
Коммит 9f05df43d6
3 изменённых файлов: 0 добавлений и 34 удалений

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

@ -3602,10 +3602,6 @@ Toolbox.prototype = {
_destroyToolbox: async function() {
this.emit("destroy");
// This flag will be checked by Fronts in order to decide if they should
// skip their destroy.
this.target.client.isToolboxDestroy = true;
this.off("select", this._onToolSelected);
this.off("host-changed", this._refreshHostTitle);

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

@ -30,13 +30,6 @@ class ObjectFront extends FrontClassWithSpec(objectSpec) {
parentFront.manage(this);
}
skipDestroy() {
// Object fronts are simple fronts, they don't need to be cleaned up on
// toolbox destroy. `conn` is a DebuggerClient instance, check the
// `isToolboxDestroy` flag to skip the destroy.
return this.conn && this.conn.isToolboxDestroy;
}
getGrip() {
return this._grip;
}

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

@ -141,22 +141,6 @@ class Pool extends EventEmitter {
}
}
/**
* Pools can override this method in order to opt-out of a destroy sequence.
*
* For instance, Fronts are destroyed during the toolbox destroy. However when
* the toolbox is destroyed, the document holding the toolbox is also
* destroyed. So it should not be necessary to cleanup Fronts during toolbox
* destroy.
*
* For the time being, Fronts (or Pools in general) which want to opt-out of
* toolbox destroy can override this method and check the value of
* `this.conn.isToolboxDestroy`.
*/
skipDestroy() {
return false;
}
/**
* Destroy this item, removing it from a parent if it has one,
* and destroying all children if necessary.
@ -174,13 +158,6 @@ class Pool extends EventEmitter {
if (actor === this) {
continue;
}
// Some pool-managed values don't extend Pool and won't have skipDestroy
// defined. For instance, the root actor and the lazy actors.
if (typeof actor.skipDestroy === "function" && actor.skipDestroy()) {
continue;
}
const destroy = actor.destroy;
if (destroy) {
// Disconnect destroy while we're destroying in case of (misbehaving)