| Index: chrome/nacl/nacl_main.cc
|
| diff --git a/chrome/nacl/nacl_main.cc b/chrome/nacl/nacl_main.cc
|
| index 9b7a8c6b95dbf227b37a6a02799a97dcf7075d8e..a7c11247ba6a103b3928c90cc7abc5af05f937a1 100644
|
| --- a/chrome/nacl/nacl_main.cc
|
| +++ b/chrome/nacl/nacl_main.cc
|
| @@ -33,6 +33,12 @@ int NaClMain(const content::MainFunctionParams& parameters) {
|
| bool no_sandbox = parsed_command_line.HasSwitch(switches::kNoSandbox);
|
| platform.InitSandboxTests(no_sandbox);
|
|
|
| +#if defined(OS_POSIX)
|
| + // The number of cores must be obtained before the invocation of
|
| + // platform.EnableSandbox(), so cannot simply be inlined below.
|
| + int number_of_cores = sysconf(_SC_NPROCESSORS_ONLN);
|
| +#endif
|
| +
|
| if (!no_sandbox) {
|
| platform.EnableSandbox();
|
| }
|
| @@ -40,6 +46,9 @@ int NaClMain(const content::MainFunctionParams& parameters) {
|
|
|
| if (sandbox_test_result) {
|
| NaClListener listener;
|
| +#if defined(OS_POSIX)
|
| + listener.set_number_of_cores(number_of_cores);
|
| +#endif
|
| listener.Listen();
|
| } else {
|
| // This indirectly prevents the test-harness-success-cookie from being set,
|
|
|