Commit 714a70bc authored by Ken Rockot's avatar Ken Rockot Committed by Commit Bot

Suppress service manager log spam

Suppresses log spam about "native service" failures when the service in
question is content_renderer. This is because, unlike for any other
service in the system, hitting the native service launcher codepath for
content_renderer is simply an innocuous side effect of some raciness
between browser features and renderer termination.

Bug: None
Change-Id: I8f73c7ecbe167c160e9df0f3aac3214063997d39
Reviewed-on: https://chromium-review.googlesource.com/1103155Reviewed-by: default avatarJohn Abd-El-Malek <jam@chromium.org>
Commit-Queue: Ken Rockot <rockot@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567873}
parent 145528f0
...@@ -245,8 +245,20 @@ class NullServiceProcessLauncherFactory ...@@ -245,8 +245,20 @@ class NullServiceProcessLauncherFactory
private: private:
std::unique_ptr<service_manager::ServiceProcessLauncher> Create( std::unique_ptr<service_manager::ServiceProcessLauncher> Create(
const base::FilePath& service_path) override { const base::FilePath& service_path) override {
LOG(ERROR) << "Attempting to run unsupported native service: " // There are innocuous races where browser code may attempt to connect
<< service_path.value(); // to a specific renderer instance through the Service Manager after that
// renderer has been terminated. These result in this code path being hit
// fairly regularly and the resulting log spam causes confusion. We suppress
// this message only for "content_renderer".
const base::FilePath::StringType kRendererServiceFilename =
base::FilePath().AppendASCII(mojom::kRendererServiceName).value();
const base::FilePath::StringType service_executable =
service_path.BaseName().value();
if (service_executable.find(kRendererServiceFilename) ==
base::FilePath::StringType::npos) {
LOG(ERROR) << "Attempting to run unsupported native service: "
<< service_path.value();
}
return nullptr; return nullptr;
} }
......
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