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

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: don't forget to serialize Created 7 years, 11 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 | « chrome/common/render_messages.h ('k') | chrome/renderer/pepper/ppb_nacl_private_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/nacl/nacl_listener.cc
diff --git a/chrome/nacl/nacl_listener.cc b/chrome/nacl/nacl_listener.cc
index bb8eea550911aaac0fa8ab1709a2a0a27b60b230..161efd44b6c07e2c148828bc18a894cf86cecbf9 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.
« no previous file with comments | « chrome/common/render_messages.h ('k') | chrome/renderer/pepper/ppb_nacl_private_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698