DescriptionExpose NaClAppSetDesc() to Chromium for use at startup
Some refactoring of NaCl startup, required for implementing Bare Metal
Mode, involves providing two Chrome IPC FDs to untrusted code at
startup instead of the original one FD. Rather than converting
initial_ipc_fd into an array (or worse, adding initial_ipc_fd2), I
think it's cleaner to expose NaClAppSetDesc() to the embedder.
So, split up NaClChromeMainStart() into two parts:
* NaClAppCreate()
* NaClChromeMainStartApp()
so that NaClAppSetDesc() may be called inbetween on the NaClApp.
This also involves changing when NaClAllModulesInit() gets called. On
Windows, NaClAppCtor() crashes if NaClSecureRngModuleInit() hasn't
been called (because Windows IMC wants a random number), but on Unix,
in the Chrome sandbox, NaClSecureRngModuleSetUrandomFd() must be
called before NaClAllModulesInit().
So add NaClChromeMainInit() and NaClChromeMainSetUrandomFd() to deal
with that.
The new and old usages are explained in chrome_main.h.
Move NaClChromeMainStart()'s memset() call to
NaClAppWithSyscallTableCtor().
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3734
TEST=run_sel_main_chrome_test
R=bradnelson@google.com
Committed: https://src.chromium.org/viewvc/native_client?view=rev&revision=12710
Patch Set 1 #Patch Set 2 : Fix Windows #Patch Set 3 : Rebase and fix #
Messages
Total messages: 6 (0 generated)
|