| Index: chrome/nacl/nacl_listener.cc
|
| diff --git a/chrome/nacl/nacl_listener.cc b/chrome/nacl/nacl_listener.cc
|
| index d0e0a8a72ff45665fc4b70805fc74fbcbf2e0301..b82ca0f8df98ed91aa17b1568a33ca3c05246148 100644
|
| --- a/chrome/nacl/nacl_listener.cc
|
| +++ b/chrome/nacl/nacl_listener.cc
|
| @@ -26,6 +26,8 @@
|
| #if defined(OS_WIN)
|
| #include <fcntl.h>
|
| #include <io.h>
|
| +
|
| +#include "content/public/common/sandbox_init.h"
|
| #endif
|
|
|
| namespace {
|
| @@ -67,6 +69,19 @@ int CreateMemoryObject(size_t size, int executable) {
|
| return content::MakeSharedMemorySegmentViaIPC(size, executable);
|
| }
|
|
|
| +#elif defined(OS_WIN)
|
| +
|
| +// We wrap the function to convert the bool return value to an int.
|
| +int BrokerDuplicateHandle(NaClHandle source_handle,
|
| + uint32_t process_id,
|
| + NaClHandle* target_handle,
|
| + uint32_t desired_access,
|
| + uint32_t options) {
|
| + return content::BrokerDuplicateHandle(source_handle, process_id,
|
| + target_handle, desired_access,
|
| + options);
|
| +}
|
| +
|
| #endif
|
|
|
| // Use an env var because command line args are eaten by nacl_helper.
|
| @@ -203,6 +218,9 @@ void NaClListener::OnStartSelLdr(std::vector<nacl::FileDescriptor> handles,
|
| args->imc_bootstrap_handle = nacl::ToNativeHandle(handles[0]);
|
| args->enable_exception_handling = enable_exception_handling;
|
| args->enable_debug_stub = debug_enabled_;
|
| +#if defined(OS_WIN)
|
| + args->broker_duplicate_handle_func = BrokerDuplicateHandle;
|
| +#endif
|
| NaClChromeMainStart(args);
|
| NOTREACHED();
|
| }
|
|
|