Chromium Code Reviews| Index: chrome/nacl/nacl_main.cc |
| diff --git a/chrome/nacl/nacl_main.cc b/chrome/nacl/nacl_main.cc |
| index 9b7a8c6b95dbf227b37a6a02799a97dcf7075d8e..aebb724917492c45f70dd6bd48a5abc62f8aaeae 100644 |
| --- a/chrome/nacl/nacl_main.cc |
| +++ b/chrome/nacl/nacl_main.cc |
| @@ -33,6 +33,10 @@ int NaClMain(const content::MainFunctionParams& parameters) { |
| bool no_sandbox = parsed_command_line.HasSwitch(switches::kNoSandbox); |
| platform.InitSandboxTests(no_sandbox); |
| +#if defined(OS_POSIX) |
| + int number_of_cores = sysconf(_SC_NPROCESSORS_ONLN); |
|
Nick Bray (chromium)
2013/04/18 00:24:18
Why not inline? The skew between the preprocessor
bsy
2013/04/18 03:25:06
unskewed. added comment explaining that this has
|
| +#endif |
| + |
| if (!no_sandbox) { |
| platform.EnableSandbox(); |
| } |
| @@ -40,6 +44,9 @@ int NaClMain(const content::MainFunctionParams& parameters) { |
| if (sandbox_test_result) { |
| NaClListener listener; |
| +#if defined(OS_LINUX) || defined(OS_MACOSX) |
| + listener.set_number_of_cores(number_of_cores); |
| +#endif |
| listener.Listen(); |
| } else { |
| // This indirectly prevents the test-harness-success-cookie from being set, |