commit | 9662b9139cd8fdef750a012f16fa90043bf884ff | [log] [tgz] |
---|---|---|
author | Andrea Orru <andreaorru@chromium.org> | Thu May 08 08:19:59 2025 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu May 08 08:19:59 2025 |
tree | daade2b2f773631c161da1f9cbe35997effa7961 | |
parent | 9d43841c1e1c87ba21e3078ac34f55905a2164ac [diff] |
[Extensions] Prevent extension SW untracking when sub-scope SW stops Previously, stopping a sub-scope service worker (e.g., registered via `navigator.serviceWorker.register()` from an extension page) would incorrectly cause the `ServiceWorkerTaskQueue` to reset its WorkerState properties for the main extension service worker. This is because `UntrackServiceWorkerState` didn't differentiate worker roles and assumed any stopped worker was the extension service worker defined in the manifest. Consequently, the extension worker would stop processing all events. This change modifies `ServiceWorkerTaskQueue::UntrackServiceWorkerState` to only reset its WorkerState properties for the main worker if the stopped worker's version ID matches the tracked main extension service worker's version ID. Bug: 395536907 Change-Id: If9671fee3df8b960b4f014aff6352ff2c12f7908 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6506040 Commit-Queue: Andrea Orru <andreaorru@chromium.org> Reviewed-by: Devlin Cronin <rdevlin.cronin@chromium.org> Cr-Commit-Position: refs/heads/main@{#1457453}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.