зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1737255 - [devtools] Remove backward compatibilty code for this.traits r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D129256
This commit is contained in:
Родитель
ddc8f968ac
Коммит
acb42371b2
|
@ -22,7 +22,7 @@ add_task(async function() {
|
|||
await testGetTargetWithConcurrentCalls(tabDescriptors, tabTarget => {
|
||||
// We only call BrowsingContextTargetFront.attach and not TargetMixin.attachAndInitThread.
|
||||
// So very few things are done.
|
||||
return !!tabTarget.traits;
|
||||
return !!tabTarget.targetForm?.traits;
|
||||
});
|
||||
|
||||
await client.close();
|
||||
|
|
|
@ -272,12 +272,6 @@ function TargetMixin(parentClass) {
|
|||
* @return {Mixed}
|
||||
*/
|
||||
getTrait(traitName) {
|
||||
// @backward-compat { version 93 } All traits should be on the `targetForm`, remove
|
||||
// this backward compatibility code.
|
||||
if (this.traits && this.traits[traitName]) {
|
||||
return this.traits[traitName];
|
||||
}
|
||||
|
||||
// If the targeted actor exposes traits and has a defined value for this
|
||||
// traits, override the root actor traits
|
||||
if (this.targetForm.traits && traitName in this.targetForm.traits) {
|
||||
|
|
|
@ -121,10 +121,6 @@ class WindowGlobalTargetFront extends TargetMixin(
|
|||
const response = await super.attach();
|
||||
|
||||
this.targetForm.threadActor = response.threadActor;
|
||||
|
||||
// @backward-compat { version 93 } Remove this. All the traits are on form and can be accessed
|
||||
// using getTraits.
|
||||
this.traits = response.traits || {};
|
||||
})();
|
||||
return this._attach;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче