diff options
author | jvoung@google.com <jvoung@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-11 18:22:56 +0000 |
---|---|---|
committer | jvoung@google.com <jvoung@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-11 18:22:56 +0000 |
commit | 2e1e6f08d7af12f39932cdc5c1212c5b999c897e (patch) | |
tree | 2067063f43950984f82929ff5c8515e91989e2e4 /chrome/nacl | |
parent | 5be80669321ce2a943d499b7d72f8e71b0c25b7a (diff) | |
download | chromium_src-2e1e6f08d7af12f39932cdc5c1212c5b999c897e.zip chromium_src-2e1e6f08d7af12f39932cdc5c1212c5b999c897e.tar.gz chromium_src-2e1e6f08d7af12f39932cdc5c1212c5b999c897e.tar.bz2 |
When launching PNaCl helper nexes, explicitly disable IRT loading.
This is done by setting the irt_fd to -1. However NaCl
currently errors out when given -1, so this depends on a
NaCl-side sel_ldr change which will understand that -1 means
skip loading: https://codereview.chromium.org/11743028/
BUG= http://code.google.com/p/nativeclient/issues/detail?id=3241
TEST= manual (patch in NaCl side CL and run PNaCl w/ TOOLS_REVISION at 10509).
Review URL: https://codereview.chromium.org/11761025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176389 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/nacl')
-rw-r--r-- | chrome/nacl/nacl_listener.cc | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/chrome/nacl/nacl_listener.cc b/chrome/nacl/nacl_listener.cc index bb8eea5..161efd4 100644 --- a/chrome/nacl/nacl_listener.cc +++ b/chrome/nacl/nacl_listener.cc @@ -234,20 +234,25 @@ void NaClListener::OnStart(const nacl::NaClStartParams& params) { # endif #endif - CHECK(handles.size() >= 1); - NaClHandle irt_handle = nacl::ToNativeHandle(handles[handles.size() - 1]); - handles.pop_back(); + if (params.uses_irt) { + CHECK(handles.size() >= 1); + NaClHandle irt_handle = nacl::ToNativeHandle(handles[handles.size() - 1]); + handles.pop_back(); #if defined(OS_WIN) - args->irt_fd = _open_osfhandle(reinterpret_cast<intptr_t>(irt_handle), - _O_RDONLY | _O_BINARY); - if (args->irt_fd < 0) { - LOG(ERROR) << "_open_osfhandle() failed"; - return; - } + args->irt_fd = _open_osfhandle(reinterpret_cast<intptr_t>(irt_handle), + _O_RDONLY | _O_BINARY); + if (args->irt_fd < 0) { + LOG(ERROR) << "_open_osfhandle() failed"; + return; + } #else - args->irt_fd = irt_handle; + args->irt_fd = irt_handle; #endif + } else { + // Otherwise, the IRT handle is not even sent. + args->irt_fd = -1; + } if (params.validation_cache_enabled) { // SHA256 block size. |