summaryrefslogtreecommitdiffstats
path: root/chrome/browser/nacl_process_host.cc
diff options
context:
space:
mode:
authordspringer@google.com <dspringer@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-27 18:52:13 +0000
committerdspringer@google.com <dspringer@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-27 18:52:13 +0000
commit599e66405108cc22e3cfadeeb65ed59a7913d153 (patch)
treea871c7c890d7b677dac8753523c96ef61648182d /chrome/browser/nacl_process_host.cc
parent977e35fe3f7eda0dc1d2c1d6b9cbfa3ab67780b0 (diff)
downloadchromium_src-599e66405108cc22e3cfadeeb65ed59a7913d153.zip
chromium_src-599e66405108cc22e3cfadeeb65ed59a7913d153.tar.gz
chromium_src-599e66405108cc22e3cfadeeb65ed59a7913d153.tar.bz2
Make NaCl run in Chrome on the Mac.
Note: this is a *slight* rework of CL 555082, which accidentally broke the build. That CL was reviewed and LGTM'd byt sehr@ and bsy@. BUG=none TEST=none Review URL: http://codereview.chromium.org/551172 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37279 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/nacl_process_host.cc')
-rw-r--r--chrome/browser/nacl_process_host.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/chrome/browser/nacl_process_host.cc b/chrome/browser/nacl_process_host.cc
index da40335..53af990 100644
--- a/chrome/browser/nacl_process_host.cc
+++ b/chrome/browser/nacl_process_host.cc
@@ -94,13 +94,22 @@ bool NaClProcessHost::LaunchSelLdr() {
switches::kEnableDCHECK,
switches::kSilentDumpOnDCHECK,
switches::kMemoryProfiling,
+ switches::kEnableNaCl,
};
const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
+
+#if defined(OS_MACOSX)
+// TODO(dspringer): NaCl is temporalrily disabled on the Mac by default, but it
+// can be enabled with the --enable-nacl cmd-line switch. Remove this check
+// when the security issues in the Mac PIC code are resolved.
+ if (!browser_command_line.HasSwitch(switches::kEnableNaCl))
+ return false;
+#endif
+
for (size_t i = 0; i < arraysize(switch_names); ++i) {
if (browser_command_line.HasSwitch(switch_names[i])) {
- cmd_line->AppendSwitchWithValue(
- switch_names[i],
+ cmd_line->AppendSwitchWithValue(switch_names[i],
browser_command_line.GetSwitchValueASCII(switch_names[i]));
}
}