Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(544)

Unified Diff: content/common/sandbox_linux/sandbox_linux.cc

Issue 189093008: Revert of Implement '--gpu-sandbox-failures-nonfatal' flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/gpu/gpu_process_host.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/sandbox_linux/sandbox_linux.cc
diff --git a/content/common/sandbox_linux/sandbox_linux.cc b/content/common/sandbox_linux/sandbox_linux.cc
index 32608e83e6fb98d98fff4e60ad4dc5f2f9181c1a..a30e41c416581d872f18bf2fabaac1cea33b9e31 100644
--- a/content/common/sandbox_linux/sandbox_linux.cc
+++ b/content/common/sandbox_linux/sandbox_linux.cc
@@ -79,14 +79,6 @@
#endif
}
-bool IsChromeOS() {
-#if defined(OS_CHROMEOS)
- return true;
-#else
- return false;
-#endif
-}
-
// Try to open /proc/self/task/ with the help of |proc_fd|. |proc_fd| can be
// -1. Will return -1 on error and set errno like open(2).
int OpenProcTaskFd(int proc_fd) {
@@ -244,9 +236,9 @@
}
bool LinuxSandbox::InitializeSandboxImpl() {
- CommandLine* command_line = CommandLine::ForCurrentProcess();
const std::string process_type =
- command_line->GetSwitchValueASCII(switches::kProcessType);
+ CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ switches::kProcessType);
// We need to make absolutely sure that our sandbox is "sealed" before
// returning.
@@ -269,20 +261,10 @@
// even report an error about it.
if (IsRunningTSAN())
return false;
-
- // The GPU process is allowed to call InitializeSandbox() with threads.
- bool sandbox_failure_fatal = process_type != switches::kGpuProcess;
-
- // On Chrome OS, the GPU process is only allowed to call InitializeSandbox()
- // with threads if '--gpu-sandbox-failures-nonfatal' is passed.
- if (IsChromeOS()) {
- sandbox_failure_fatal |=
- !command_line->HasSwitch(switches::kGpuSandboxFailuresNonfatal);
- }
-
- if (sandbox_failure_fatal)
- LOG(FATAL) << error_message;
-
+ // The GPU process is allowed to call InitializeSandbox() with threads for
+ // now, because it loads third-party libraries.
+ if (process_type != switches::kGpuProcess)
+ CHECK(false) << error_message;
LOG(ERROR) << error_message;
return false;
}
« no previous file with comments | « content/browser/gpu/gpu_process_host.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698