Introduce ServiceWorkerClientOwner
To allow updating the key of `service_worker_clients_by_uuid_` correctly from `ServiceWorkerClient::UpdateUrls()` even after `ServiceWorkerContextWrapper::DidDeleteAndStartOver()`, this CL splits the client-ownership-related members from `ServiceWorkerContextCore` into a new class `ServiceWorkerClientOwner`. `ServiceWorkerClient::owner_` keeps access to `ServiceWorkerClientOwner` while `ServiceWorkerClient::context_` is still cleared on `DidDeleteAndStartOver`. A regression test will be added in https://chromium-review.googlesource.com/c/chromium/src/+/5590788. The DCHECK() in OnContainerHostReceiverDisconnected() (that would fail with the regression test without this CL) is turned to CHECK() to confirm the correctness. Bug: 336154571, 344130634 Change-Id: If772d4f38749ed0ead3937084287e1c1c26259ee Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5587598 Reviewed-by:Hiroki Nakagawa <nhiroki@chromium.org> Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org> Reviewed-by:
Yoshisato Yanagisawa <yyanagisawa@chromium.org> Reviewed-by:
Alex Moshchuk <alexmos@chromium.org> Cr-Commit-Position: refs/heads/main@{#1313606}
Loading
Please register or sign in to comment