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

Unified Diff: chrome/nacl/nacl_listener.cc

Issue 11761025: When launching PNaCl helper nexes, explicitly disable IRT loading. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 12 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: chrome/nacl/nacl_listener.cc
diff --git a/chrome/nacl/nacl_listener.cc b/chrome/nacl/nacl_listener.cc
index bb8eea550911aaac0fa8ab1709a2a0a27b60b230..2bf3a0e995e3a61c24f65f3132c29a2fb7ba89d2 100644
--- a/chrome/nacl/nacl_listener.cc
+++ b/chrome/nacl/nacl_listener.cc
@@ -238,16 +238,20 @@ void NaClListener::OnStart(const nacl::NaClStartParams& params) {
NaClHandle irt_handle = nacl::ToNativeHandle(handles[handles.size() - 1]);
handles.pop_back();
+ if (params.uses_irt) {
#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 {
+ args->irt_fd = -1;
Mark Seaborn 2013/01/04 00:05:41 Maybe comment that the IRT FD/handle remains open
jvoung (off chromium) 2013/01/04 00:29:42 Or how about avoid sending the handle in the first
+ }
if (params.validation_cache_enabled) {
// SHA256 block size.

Powered by Google App Engine
This is Rietveld 408576698