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

Unified Diff: components/nacl/loader/nonsfi/nonsfi_main.cc

Issue 418133006: Replace the argument of nonsfi::MainStart with raw file descriptor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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
« no previous file with comments | « components/nacl/loader/nonsfi/nonsfi_main.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/loader/nonsfi/nonsfi_main.cc
diff --git a/components/nacl/loader/nonsfi/nonsfi_main.cc b/components/nacl/loader/nonsfi/nonsfi_main.cc
index 96c6cb2684306969648fb7c033cd7154d9daafe3..8ec69950232dfed795024ccac159072e1f1956a4 100644
--- a/components/nacl/loader/nonsfi/nonsfi_main.cc
+++ b/components/nacl/loader/nonsfi/nonsfi_main.cc
@@ -13,6 +13,8 @@
#include "native_client/src/include/elf_auxv.h"
#include "native_client/src/include/nacl_macros.h"
#include "native_client/src/trusted/desc/nacl_desc_base.h"
+#include "native_client/src/trusted/desc/nacl_desc_io.h"
+#include "native_client/src/trusted/service_runtime/include/sys/fcntl.h"
namespace nacl {
namespace nonsfi {
@@ -64,8 +66,9 @@ struct NaClDescUnrefer {
} // namespace
-void MainStart(NaClDesc* nexe_file) {
- ::scoped_ptr<struct NaClDesc, NaClDescUnrefer> desc(nexe_file);
+void MainStart(int nexe_file) {
+ ::scoped_ptr<struct NaClDesc, NaClDescUnrefer> desc(
+ NaClDescIoDescFromDescAllocCtor(nexe_file, NACL_ABI_O_RDONLY));
ElfImage image;
if (image.Read(desc.get()) != LOAD_OK) {
LOG(ERROR) << "LoadModuleRpc: Failed to read binary.";
« no previous file with comments | « components/nacl/loader/nonsfi/nonsfi_main.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698