diff options
Diffstat (limited to 'chrome/nacl')
-rw-r--r-- | chrome/nacl/DEPS | 7 | ||||
-rw-r--r-- | chrome/nacl/nacl_thread.cc | 9 |
2 files changed, 16 insertions, 0 deletions
diff --git a/chrome/nacl/DEPS b/chrome/nacl/DEPS index 8bdeefd..c2468b9 100644 --- a/chrome/nacl/DEPS +++ b/chrome/nacl/DEPS @@ -1,5 +1,12 @@ include_rules = [ "+app", + # TODO(mseaborn): Remove chrome/renderer from this list. This is + # here because we need chrome/renderer/renderer_sandbox_support_linux.h + # for creating shared memory segments. We should probably move this + # sandbox support code out of chrome/renderer. (Previously, this + # header was #included from the native_client directory, which was + # worse.) + "+chrome/renderer", "+chrome/test", "+sandbox/src", "+native_client/src", diff --git a/chrome/nacl/nacl_thread.cc b/chrome/nacl/nacl_thread.cc index c0a64a7..709b976 100644 --- a/chrome/nacl/nacl_thread.cc +++ b/chrome/nacl/nacl_thread.cc @@ -7,6 +7,11 @@ #include "base/scoped_ptr.h" #include "chrome/common/notification_service.h" #include "chrome/common/nacl_messages.h" +#include "native_client/src/shared/imc/nacl_imc.h" + +#if defined(OS_LINUX) +#include "chrome/renderer/renderer_sandbox_support_linux.h" +#endif // This is ugly. We need an interface header file for the exported // sel_ldr interfaces. @@ -40,6 +45,10 @@ void NaClThread::OnControlMessageReceived(const IPC::Message& msg) { } void NaClThread::OnStartSelLdr(std::vector<nacl::FileDescriptor> handles) { +#if defined(OS_LINUX) + nacl::SetCreateMemoryObjectFunc( + renderer_sandbox_support::MakeSharedMemorySegmentViaIPCExecutable); +#endif scoped_array<NaClHandle> array(new NaClHandle[handles.size()]); for (size_t i = 0; i < handles.size(); i++) { array[i] = nacl::ToNativeHandle(handles[i]); |