| Index: chrome/common/child_process_host.cc
|
| diff --git a/chrome/common/child_process_host.cc b/chrome/common/child_process_host.cc
|
| index d4a9edae18f65a1618109023352df2ef1a1bf3b8..2e0f1f600c45da326389b7640fc34d7c8776069f 100644
|
| --- a/chrome/common/child_process_host.cc
|
| +++ b/chrome/common/child_process_host.cc
|
| @@ -93,16 +93,20 @@ FilePath ChildProcessHost::GetChildPath() {
|
| if (!child_path.empty())
|
| return child_path;
|
|
|
| -#if !defined(OS_MACOSX)
|
| - // On most platforms, the child executable is the same as the current
|
| - // executable.
|
| - PathService::Get(base::FILE_EXE, &child_path);
|
| -#else
|
| +#if defined(OS_LINUX)
|
| + // Use /proc/self/exe rather than our known binary path so updates
|
| + // can't swap out the binary from underneath us.
|
| + child_path = FilePath("/proc/self/exe");
|
| +#elif defined(OS_MACOSX)
|
| // On the Mac, the child executable lives at a predefined location within
|
| // the app bundle's versioned directory.
|
| child_path = chrome::GetVersionedDirectory().
|
| Append(chrome::kHelperProcessExecutablePath);
|
| -#endif // OS_MACOSX
|
| +#else
|
| + // On most platforms, the child executable is the same as the current
|
| + // executable.
|
| + PathService::Get(base::FILE_EXE, &child_path);
|
| +#endif
|
|
|
| return child_path;
|
| }
|
|
|