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

Side by Side Diff: mojo/nacl/nexe_launcher_nonsfi.cc

Issue 1371413003: Refactored launching of nexes to separate file. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Code Review Created 5 years, 2 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "mojo/nacl/nexe_launcher_nonsfi.h"
6
7 #include "base/files/file_util.h"
8 #include "mojo/nacl/irt_mojo_nonsfi.h"
9 #include "mojo/public/c/system/types.h"
10 #include "native_client/src/public/irt_core.h"
11 #include "native_client/src/public/nonsfi/elf_loader.h"
12
13 namespace nacl {
14
15 void MojoLaunchNexeNonsfi(int fd, MojoHandle handle) {
16 // Run -- also, closes the fd, removing the temp file.
17 uintptr_t entry = NaClLoadElfFile(fd);
18
19 MojoSetInitialHandle(handle);
20 int argc = 1;
21 char* argvp = const_cast<char*>("NaClMain");
22 char* envp = nullptr;
23 nacl_irt_nonsfi_entry(argc, &argvp, &envp,
24 reinterpret_cast<nacl_entry_func_t>(entry),
25 MojoIrtNonsfiQuery);
26 abort();
27 NOTREACHED();
28 }
29
30 } // namespace nacl
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698