Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(861)

Unified Diff: components/nacl/loader/nacl_listener.cc

Issue 337463002: Remove LoadModule SRPC for non-SFI mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/nacl/loader/nacl_listener.cc
diff --git a/components/nacl/loader/nacl_listener.cc b/components/nacl/loader/nacl_listener.cc
index f5c282ae461f8dd87aef5f5cbbc7e8eeb68cbb0b..4e1eca75fc279596473f174b9c7440706de63da1 100644
--- a/components/nacl/loader/nacl_listener.cc
+++ b/components/nacl/loader/nacl_listener.cc
@@ -33,6 +33,8 @@
#endif
#if defined(OS_LINUX)
+#include <fcntl.h>
+
#include "components/nacl/loader/nonsfi/irt_random.h"
#include "components/nacl/loader/nonsfi/nonsfi_main.h"
#include "content/public/common/child_process_sandbox_support_linux.h"
@@ -448,6 +450,15 @@ void NaClListener::StartNonSfi(const nacl::NaClStartParams& params) {
base::FileDescriptor(manifest_service_client_fd, true);
}
+ CHECK(params.nexe_file != IPC::InvalidPlatformFileForTransit());
+ NaClFileInfo nexe_file_info;
+ nexe_file_info.desc =
+ IPC::PlatformFileForTransitToPlatformFile(params.nexe_file);
+ nexe_file_info.file_token.lo = params.nexe_token_lo;
+ nexe_file_info.file_token.hi = params.nexe_token_hi;
+
+ nacl::nonsfi::MainStart(NaClDescIoFromFileInfo(nexe_file_info, O_RDONLY));
Mark Seaborn 2014/06/17 00:50:31 Why move this to occur earlier? It might reduce t
hidehiko 2014/06/18 08:43:32 Moved below.
+
// TODO(teravest): Do we plan on using this renderer handle for nexe loading
// for non-SFI? Right now, passing an empty channel handle instead causes
// hangs, so we'll keep it.
@@ -468,9 +479,9 @@ void NaClListener::StartNonSfi(const nacl::NaClStartParams& params) {
CHECK(params.debug_stub_server_bound_socket.fd == -1);
CHECK(!params.uses_irt);
+ // Currently imc bootstrap handle is still sent to the plugin.
+ // Get rid of this.
Mark Seaborn 2014/06/17 00:50:31 Nit: This comment should have a "TODO" in front of
hidehiko 2014/06/18 08:43:32 Done.
CHECK(params.handles.size() == 1);
- int imc_bootstrap_handle = nacl::ToNativeHandle(params.handles[0]);
- nacl::nonsfi::MainStart(imc_bootstrap_handle);
#endif // defined(OS_LINUX)
}

Powered by Google App Engine
This is Rietveld 408576698