diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:40:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:40:09 +0000 |
commit | c1701504b2366542c32c5e6eeff1ba62cc75f8f6 (patch) | |
tree | 81b15ef2846efcdbb09422dd283399e769cb7ef9 /toolkit/components/extensions/parent | |
parent | Releasing progress-linux version 115.10.0esr-1~progress7.99u1. (diff) | |
download | firefox-esr-c1701504b2366542c32c5e6eeff1ba62cc75f8f6.tar.xz firefox-esr-c1701504b2366542c32c5e6eeff1ba62cc75f8f6.zip |
Merging upstream version 115.11.0esr.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | toolkit/components/extensions/parent/ext-backgroundPage.js | 4 | ||||
-rw-r--r-- | toolkit/components/extensions/parent/ext-runtime.js | 7 |
2 files changed, 8 insertions, 3 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; diff --git a/toolkit/components/extensions/parent/ext-runtime.js b/toolkit/components/extensions/parent/ext-runtime.js index cd18e0f0aa..2122e8faed 100644 --- a/toolkit/components/extensions/parent/ext-runtime.js +++ b/toolkit/components/extensions/parent/ext-runtime.js @@ -237,9 +237,12 @@ this.runtime = class extends ExtensionAPIPersistent { }, async internalWakeupBackground() { + const { background } = extension.manifest; if ( - extension.manifest.background && - !extension.manifest.background.service_worker && + background && + (background.page || background.scripts) && + // Note: if background.service_worker is specified, it takes + // precedence over page/scripts, and persistentBackground is false. !extension.persistentBackground ) { await extension.wakeupBackground(); |