From 64c147e23dff198d8416f2cc5bee148875b2b630 Mon Sep 17 00:00:00 2001 From: Julian Descottes Date: Tue, 9 Jun 2020 09:15:33 +0000 Subject: [PATCH] Bug 1583738 - Remove unused isDescriptor trait from webextension descriptor r=daisuke Differential Revision: https://phabricator.services.mozilla.com/D78002 --- devtools/client/fronts/descriptors/webextension.js | 8 +------- devtools/server/actors/descriptors/webextension.js | 6 +----- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/devtools/client/fronts/descriptors/webextension.js b/devtools/client/fronts/descriptors/webextension.js index 5a42fe933db7..c41f71a7d8f0 100644 --- a/devtools/client/fronts/descriptors/webextension.js +++ b/devtools/client/fronts/descriptors/webextension.js @@ -60,13 +60,7 @@ class WebExtensionDescriptorFront extends FrontClassWithSpec( // the addon (e.g. when the addon is disabled or uninstalled). // To retrieve the target actor instance, we call its "connect" method, (which // fetches the target actor targetForm from a WebExtensionTargetActor instance). - let form = null; - // FF70+ The method is now called getTarget` - if (!this.traits.isDescriptor) { - form = await super.connect(); - } else { - form = await super.getTarget(); - } + const form = await super.getTarget(); const front = new BrowsingContextTargetFront(this.conn, null, this); front.form(form); this.manage(front); diff --git a/devtools/server/actors/descriptors/webextension.js b/devtools/server/actors/descriptors/webextension.js index 1732f2c0d55e..768cccd81a75 100644 --- a/devtools/server/actors/descriptors/webextension.js +++ b/devtools/server/actors/descriptors/webextension.js @@ -83,11 +83,7 @@ const WebExtensionDescriptorActor = protocol.ActorClassWithSpec( manifestURL: policy && policy.getURL("manifest.json"), name: this.addon.name, temporarilyInstalled: this.addon.temporarilyInstalled, - traits: { - // checked in the front descriptor. - // remove when FF70 is on release channel - isDescriptor: true, - }, + traits: {}, type: this.addon.type, url: this.addon.sourceURI ? this.addon.sourceURI.spec : undefined, warnings: ExtensionParent.DebugUtils.getExtensionManifestWarnings(