From 39554566cc40121501aa20cd84951b4c3aa42a01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Pergl?= Date: Tue, 23 Jan 2018 16:25:01 +0100 Subject: [PATCH] Allow IO while constructing an absolute path (prevents DCHECK failure) (#11697) --- atom/browser/atom_browser_client.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/atom/browser/atom_browser_client.cc b/atom/browser/atom_browser_client.cc index ac308b0e60..6bd2e9f1ff 100644 --- a/atom/browser/atom_browser_client.cc +++ b/atom/browser/atom_browser_client.cc @@ -239,9 +239,13 @@ void AtomBrowserClient::AppendExtraCommandLineSwitches( base::CommandLine* command_line, int process_id) { // Make sure we're about to launch a known executable - base::FilePath child_path; - PathService::Get(content::CHILD_PROCESS_EXE, &child_path); - CHECK(base::MakeAbsoluteFilePath(command_line->GetProgram()) == child_path); + { + base::FilePath child_path; + PathService::Get(content::CHILD_PROCESS_EXE, &child_path); + + base::ThreadRestrictions::ScopedAllowIO allow_io; + CHECK(base::MakeAbsoluteFilePath(command_line->GetProgram()) == child_path); + } std::string process_type = command_line->GetSwitchValueASCII(::switches::kProcessType);