зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1750915 - [devtools] Remove backward compatible code for windowGlobalTarget.attach. r=jdescottes,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D136346
This commit is contained in:
Родитель
4b14e24467
Коммит
f46fac8cad
|
@ -503,13 +503,7 @@ function TargetMixin(parentClass) {
|
|||
// have the hybrid descriptor/target class which brings lots of complexity and confusion.
|
||||
// By doing so, the "attach" would be done on the server side and would simply be
|
||||
// part of the target actor instantiation.
|
||||
//
|
||||
// @backward-compat { version 96 } Fx 96 dropped the attach method on all but worker targets
|
||||
// Once Fx95 support is dropped, we can remove:
|
||||
// - the trait
|
||||
// - "attach" methods from fronts and specs for all but worker targets
|
||||
// - here, we will still have to call attach for worker targets (`if (this.attach) await this.attach()`)
|
||||
if (this.attach && !this.getTrait("isAutoAttached")) {
|
||||
if (this.attach) {
|
||||
await this.attach();
|
||||
}
|
||||
|
||||
|
|
|
@ -109,20 +109,6 @@ class WindowGlobalTargetFront extends TargetMixin(
|
|||
this._title = title;
|
||||
}
|
||||
|
||||
// @backward-compat { version 96 } Fx 96 dropped the attach method on all but worker targets
|
||||
// This can be removed once we drop 95 support
|
||||
async attach() {
|
||||
if (this._attach) {
|
||||
return this._attach;
|
||||
}
|
||||
this._attach = (async () => {
|
||||
const response = await super.attach();
|
||||
|
||||
this.targetForm.threadActor = response.threadActor;
|
||||
})();
|
||||
return this._attach;
|
||||
}
|
||||
|
||||
async detach() {
|
||||
// When calling this.destroy() at the end of this method,
|
||||
// we will end up calling detach again from TargetMixin.destroy.
|
||||
|
|
|
@ -625,11 +625,6 @@ const windowGlobalTargetPrototype = {
|
|||
watchpoints: true,
|
||||
// Supports back and forward navigation
|
||||
navigation: true,
|
||||
// The target actor no longer expose attach/detach methods and is now running
|
||||
// the code which used to be run while calling attach from its constructor.
|
||||
// The target actor is now immediately fully usable and starts inspecting the
|
||||
// WindowGlobal immediately
|
||||
isAutoAttached: true,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -11,14 +11,6 @@ const {
|
|||
Arg,
|
||||
} = require("devtools/shared/protocol");
|
||||
|
||||
// @backward-compat { version 96 } Fx 96 dropped the attach method on all but worker targets
|
||||
// This can be removed once we drop 95 support
|
||||
types.addDictType("windowGlobalTarget.attach", {
|
||||
threadActor: "number",
|
||||
javascriptEnabled: "nullable:boolean",
|
||||
traits: "json",
|
||||
});
|
||||
|
||||
types.addDictType("windowGlobalTarget.switchtoframe", {
|
||||
message: "string",
|
||||
});
|
||||
|
@ -59,12 +51,6 @@ const windowGlobalTargetSpecPrototype = {
|
|||
typeName: "windowGlobalTarget",
|
||||
|
||||
methods: {
|
||||
// @backward-compat { version 96 } Fx 96 dropped the attach method on all but worker targets
|
||||
// This can be removed once we drop 95 support
|
||||
attach: {
|
||||
request: {},
|
||||
response: RetVal("windowGlobalTarget.attach"),
|
||||
},
|
||||
detach: {
|
||||
request: {},
|
||||
response: {},
|
||||
|
|
Загрузка…
Ссылка в новой задаче