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:
Hubert Boma Manilla 2021-10-22 19:41:10 +00:00
Родитель ddc8f968ac
Коммит acb42371b2
3 изменённых файлов: 1 добавлений и 11 удалений

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

@ -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;
}