Commit 080a9172 authored by Matt Menke's avatar Matt Menke Committed by Commit Bot

Add LOG call when restarting a crashed network service.

I'm investigating a failing test, and one possible reason it could be
failing is an unexpectedly crashing network process. It also seems like
this is a significant enough event to be worth unconditionally logging,
as it could cause other unexpected behaviors as well.

Bug: 1042354
Change-Id: I2fb2ea8e7c96c0b96b1925cc39f7b02a9a4e3bbc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2031545Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Matt Menke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#737272}
parent cc9b47f3
......@@ -239,6 +239,7 @@ network::mojom::NetworkService* GetNetworkService() {
static NetworkServiceClient* g_client;
if (!g_network_service_remote->is_bound() ||
!g_network_service_remote->is_connected()) {
bool service_was_bound = g_network_service_remote->is_bound();
g_network_service_remote->reset();
if (GetContentClient()->browser()->IsShuttingDown()) {
// This happens at system shutdown, since in other scenarios the network
......@@ -257,6 +258,8 @@ network::mojom::NetworkService* GetNetworkService() {
if (IsInProcessNetworkService()) {
CreateInProcessNetworkService(std::move(receiver));
} else {
if (service_was_bound)
LOG(ERROR) << "Network service crashed, restarting service.";
ServiceProcessHost::Launch(
std::move(receiver),
ServiceProcessHost::Options()
......
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