summaryrefslogtreecommitdiffstats
path: root/components/nacl/common
diff options
context:
space:
mode:
authorhidehiko@chromium.org <hidehiko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-23 09:44:08 +0000
committerhidehiko@chromium.org <hidehiko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-23 09:44:08 +0000
commite7ca8eebb6f19be4e3899ff6c71e803d69642bc8 (patch)
tree482e33a97b6a6626e5430be18a2b6cf82025906d /components/nacl/common
parentfeee6df0c48f10587c447ee978fc05fa369f3e28 (diff)
downloadchromium_src-e7ca8eebb6f19be4e3899ff6c71e803d69642bc8.zip
chromium_src-e7ca8eebb6f19be4e3899ff6c71e803d69642bc8.tar.gz
chromium_src-e7ca8eebb6f19be4e3899ff6c71e803d69642bc8.tar.bz2
Remove LoadModule SRPC for non-SFI mode.
This CL removes LoadModule SRPC for non-SFI mode. Instead, non-SFI mode starts to pass nexe file to LaunchSelLdr, which is eventually passed to NaClListener::OnStart(). TEST=Ran browser_tests --gtest_filter=*NonSfi*:*NonSFI* locally and trybots BUG=333950 CQ_EXTRA_TRYBOTS=tryserver.chromium:linux_rel_precise32 Review URL: https://codereview.chromium.org/337463002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279069 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/nacl/common')
-rw-r--r--components/nacl/common/nacl_host_messages.h1
-rw-r--r--components/nacl/common/nacl_messages.h1
-rw-r--r--components/nacl/common/nacl_types.cc44
-rw-r--r--components/nacl/common/nacl_types.h9
4 files changed, 35 insertions, 20 deletions
diff --git a/components/nacl/common/nacl_host_messages.h b/components/nacl/common/nacl_host_messages.h
index 88237da..5525454 100644
--- a/components/nacl/common/nacl_host_messages.h
+++ b/components/nacl/common/nacl_host_messages.h
@@ -21,6 +21,7 @@
IPC_STRUCT_TRAITS_BEGIN(nacl::NaClLaunchParams)
IPC_STRUCT_TRAITS_MEMBER(manifest_url)
+ IPC_STRUCT_TRAITS_MEMBER(nexe_file)
IPC_STRUCT_TRAITS_MEMBER(render_view_id)
IPC_STRUCT_TRAITS_MEMBER(permission_bits)
IPC_STRUCT_TRAITS_MEMBER(uses_irt)
diff --git a/components/nacl/common/nacl_messages.h b/components/nacl/common/nacl_messages.h
index bb58f9e..a3b89e2 100644
--- a/components/nacl/common/nacl_messages.h
+++ b/components/nacl/common/nacl_messages.h
@@ -14,6 +14,7 @@
#define IPC_MESSAGE_START NaClMsgStart
IPC_STRUCT_TRAITS_BEGIN(nacl::NaClStartParams)
+ IPC_STRUCT_TRAITS_MEMBER(nexe_file)
IPC_STRUCT_TRAITS_MEMBER(handles)
IPC_STRUCT_TRAITS_MEMBER(debug_stub_server_bound_socket)
IPC_STRUCT_TRAITS_MEMBER(validation_cache_enabled)
diff --git a/components/nacl/common/nacl_types.cc b/components/nacl/common/nacl_types.cc
index cc339b9..0b096a65 100644
--- a/components/nacl/common/nacl_types.cc
+++ b/components/nacl/common/nacl_types.cc
@@ -8,7 +8,8 @@
namespace nacl {
NaClStartParams::NaClStartParams()
- : validation_cache_enabled(false),
+ : nexe_file(IPC::InvalidPlatformFileForTransit()),
+ validation_cache_enabled(false),
enable_exception_handling(false),
enable_debug_stub(false),
enable_ipc_proxy(false),
@@ -20,7 +21,8 @@ NaClStartParams::~NaClStartParams() {
}
NaClLaunchParams::NaClLaunchParams()
- : render_view_id(0),
+ : nexe_file(IPC::InvalidPlatformFileForTransit()),
+ render_view_id(0),
permission_bits(0),
uses_irt(false),
enable_dyncode_syscalls(false),
@@ -28,15 +30,18 @@ NaClLaunchParams::NaClLaunchParams()
enable_crash_throttling(false) {
}
-NaClLaunchParams::NaClLaunchParams(const std::string& manifest_url,
- int render_view_id,
- uint32 permission_bits,
- bool uses_irt,
- bool uses_nonsfi_mode,
- bool enable_dyncode_syscalls,
- bool enable_exception_handling,
- bool enable_crash_throttling)
+NaClLaunchParams::NaClLaunchParams(
+ const std::string& manifest_url,
+ const IPC::PlatformFileForTransit& nexe_file,
+ int render_view_id,
+ uint32 permission_bits,
+ bool uses_irt,
+ bool uses_nonsfi_mode,
+ bool enable_dyncode_syscalls,
+ bool enable_exception_handling,
+ bool enable_crash_throttling)
: manifest_url(manifest_url),
+ nexe_file(nexe_file),
render_view_id(render_view_id),
permission_bits(permission_bits),
uses_irt(uses_irt),
@@ -46,15 +51,16 @@ NaClLaunchParams::NaClLaunchParams(const std::string& manifest_url,
enable_crash_throttling(enable_crash_throttling) {
}
-NaClLaunchParams::NaClLaunchParams(const NaClLaunchParams& l) {
- manifest_url = l.manifest_url;
- render_view_id = l.render_view_id;
- permission_bits = l.permission_bits;
- uses_irt = l.uses_irt;
- uses_nonsfi_mode = l.uses_nonsfi_mode;
- enable_dyncode_syscalls = l.enable_dyncode_syscalls;
- enable_exception_handling = l.enable_exception_handling;
- enable_crash_throttling = l.enable_crash_throttling;
+NaClLaunchParams::NaClLaunchParams(const NaClLaunchParams& l)
+ : manifest_url(l.manifest_url),
+ nexe_file(l.nexe_file),
+ render_view_id(l.render_view_id),
+ permission_bits(l.permission_bits),
+ uses_irt(l.uses_irt),
+ uses_nonsfi_mode(l.uses_nonsfi_mode),
+ enable_dyncode_syscalls(l.enable_dyncode_syscalls),
+ enable_exception_handling(l.enable_exception_handling),
+ enable_crash_throttling(l.enable_crash_throttling) {
}
NaClLaunchParams::~NaClLaunchParams() {
diff --git a/components/nacl/common/nacl_types.h b/components/nacl/common/nacl_types.h
index a4759b1..e2c7793 100644
--- a/components/nacl/common/nacl_types.h
+++ b/components/nacl/common/nacl_types.h
@@ -12,6 +12,7 @@
#include "base/process/process_handle.h"
#include "build/build_config.h"
#include "ipc/ipc_channel.h"
+#include "ipc/ipc_platform_file.h"
#if defined(OS_POSIX)
#include "base/file_descriptor_posix.h"
@@ -42,6 +43,8 @@ struct NaClStartParams {
NaClStartParams();
~NaClStartParams();
+ IPC::PlatformFileForTransit nexe_file;
+
std::vector<FileDescriptor> handles;
FileDescriptor debug_stub_server_bound_socket;
@@ -68,7 +71,10 @@ struct NaClStartParams {
// nacl_host_messages.h.
struct NaClLaunchParams {
NaClLaunchParams();
- NaClLaunchParams(const std::string& u, int r, uint32 p,
+ NaClLaunchParams(const std::string& manifest_url,
+ const IPC::PlatformFileForTransit& nexe_file,
+ int render_view_id,
+ uint32 permission_bits,
bool uses_irt,
bool uses_nonsfi_mode,
bool enable_dyncode_syscalls,
@@ -78,6 +84,7 @@ struct NaClLaunchParams {
~NaClLaunchParams();
std::string manifest_url;
+ IPC::PlatformFileForTransit nexe_file;
int render_view_id;
uint32 permission_bits;
bool uses_irt;