Commit 8acad815 authored by Makoto Shimazu's avatar Makoto Shimazu Committed by Commit Bot

Skip notifying ControlleeRemoved if the client has already been removed

There's a bug that AddControllee and RemoveControllee don't match. This
is a workaround to avoid notifying the mismatching OnControlleeRemoved.

Bug: 1021718, 1015692, 1088353
Change-Id: I901de49164a650409275e43d51440ae58b5286be
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2493961
Auto-Submit: Makoto Shimazu <shimazu@chromium.org>
Commit-Queue: Kenichi Ishibashi <bashi@chromium.org>
Reviewed-by: default avatarKenichi Ishibashi <bashi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#820158}
parent a72b4325
......@@ -796,7 +796,11 @@ void ServiceWorkerVersion::AddControllee(
void ServiceWorkerVersion::RemoveControllee(const std::string& client_uuid) {
DCHECK_CURRENTLY_ON(ServiceWorkerContext::GetCoreThreadId());
DCHECK(base::Contains(controllee_map_, client_uuid));
// TODO(crbug.com/1015692): Remove this once RemoveControllee() matches with
// AddControllee().
if (!base::Contains(controllee_map_, client_uuid))
return;
controllee_map_.erase(client_uuid);
embedded_worker_->UpdateForegroundPriority();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment