Bug 1583749 - Add isDescriptor trait to webextension descriptor actor r=yulia

Depends on D47051.

Without the trait, we keep calling the connect() wrapper on the actor, which is supposed to be deprecated

Differential Revision: https://phabricator.services.mozilla.com/D47053

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Julian Descottes 2019-09-27 09:52:44 +00:00
Родитель 0af833bc23
Коммит 367847b999
1 изменённых файлов: 5 добавлений и 4 удалений

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

@ -83,6 +83,11 @@ 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,
},
type: this.addon.type,
url: this.addon.sourceURI ? this.addon.sourceURI.spec : undefined,
warnings: ExtensionParent.DebugUtils.getExtensionManifestWarnings(
@ -91,10 +96,6 @@ const WebExtensionDescriptorActor = protocol.ActorClassWithSpec(
};
},
connect() {
return this.getTarget();
},
getTarget() {
if (this._childTargetPromise) {
return this._childTargetPromise;