summaryrefslogtreecommitdiffstats
path: root/toolkit/components/extensions/parent/ext-backgroundPage.js
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/components/extensions/parent/ext-backgroundPage.js')
-rw-r--r--toolkit/components/extensions/parent/ext-backgroundPage.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/toolkit/components/extensions/parent/ext-backgroundPage.js b/toolkit/components/extensions/parent/ext-backgroundPage.js
index 725be65122..568d049b9d 100644
--- a/toolkit/components/extensions/parent/ext-backgroundPage.js
+++ b/toolkit/components/extensions/parent/ext-backgroundPage.js
@@ -264,7 +264,9 @@ this.backgroundPage = class extends ExtensionAPI {
let { manifest } = extension;
extension.backgroundState = BACKGROUND_STATE.STARTING;
- this.isWorker = Boolean(manifest.background.service_worker);
+ this.isWorker =
+ !!manifest.background.service_worker &&
+ WebExtensionPolicy.backgroundServiceWorkerEnabled;
let BackgroundClass = this.isWorker ? BackgroundWorker : BackgroundPage;