Commit 5d0a54c6 authored by Sergey Ulanov's avatar Sergey Ulanov Committed by Commit Bot

Fuchsia: Don't call MakeAbsoluteFilePath() when resolving FILE_EXE path

Previously PathProviderFuchsia() was calling MakeAbsoluteFilePath(),
which requires blocking IO, so it was DCHECKing on threads where
blocking IO is not allowed. This issue was breaking debug builds of
content_shell. Since we package all binaries produced in chromium,
argv[0] is expected to contain full path to the binary, so it's not
necessary to call MakeAbsoluteFilePath().

Bug: 787020
Change-Id: I45637ac6402ff6da1993ec571ad719a28210e721
Reviewed-on: https://chromium-review.googlesource.com/1055681Reviewed-by: default avatarScott Graham <scottmg@chromium.org>
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557937}
parent 1c397d3d
...@@ -36,11 +36,9 @@ bool PathProviderFuchsia(int key, FilePath* result) { ...@@ -36,11 +36,9 @@ bool PathProviderFuchsia(int key, FilePath* result) {
case FILE_MODULE: case FILE_MODULE:
NOTIMPLEMENTED(); NOTIMPLEMENTED();
return false; return false;
case FILE_EXE: { case FILE_EXE:
*result = base::MakeAbsoluteFilePath(base::FilePath( *result = CommandLine::ForCurrentProcess()->GetProgram();
base::CommandLine::ForCurrentProcess()->GetProgram().AsUTF8Unsafe()));
return true; return true;
}
case DIR_SOURCE_ROOT: case DIR_SOURCE_ROOT:
*result = GetPackageRoot(); *result = GetPackageRoot();
return true; return true;
......
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