Skip to content
Commit 29a5e219 authored by Hiroshige Hayashizaki's avatar Hiroshige Hayashizaki Committed by Chromium LUCI CQ
Browse files

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: default avatarHiroki Nakagawa <nhiroki@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Reviewed-by: default avatarYoshisato Yanagisawa <yyanagisawa@chromium.org>
Reviewed-by: default avatarAlex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1313606}
parent 44044d6f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment