Commit c42288d8 authored by Kenichi Ishibashi's avatar Kenichi Ishibashi Committed by Commit Bot

Check remote connection in ServiceWorkerContainerHost::CountFeature()

This is a workaround to handle a situation where `container_` is
disconnected when CountFeature() is called. Ideally `container_`
should not be disconnected during the lifetime of
ServiceWorkerContainerHost. This CL is a mitigation until we figure
out the root cause.

Bug: 1136843
Change-Id: I666624b2142d538b60957dd594cb2c3557e42a91
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2522719Reviewed-by: default avatarMakoto Shimazu <shimazu@chromium.org>
Commit-Queue: Kenichi Ishibashi <bashi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#825245}
parent 0774d32e
...@@ -525,6 +525,12 @@ void ServiceWorkerContainerHost::CountFeature( ...@@ -525,6 +525,12 @@ void ServiceWorkerContainerHost::CountFeature(
if (!is_execution_ready()) if (!is_execution_ready())
return; return;
// `container_` shouldn't be disconnected during the lifetime of `this` but
// there seems a situation where `container_` is disconnected.
// TODO(crbug.com/1136843): Figure out the cause and remove this check.
if (!container_.is_connected())
return;
container_->CountFeature(feature); container_->CountFeature(feature);
} }
......
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