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

Unified Diff: chrome/browser/nacl_host/nacl_process_host.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
Index: chrome/browser/nacl_host/nacl_process_host.cc
diff --git a/chrome/browser/nacl_host/nacl_process_host.cc b/chrome/browser/nacl_host/nacl_process_host.cc
index c8eb47afab339378d89308faa0ecb429228370b9..ec8b3dd4caf2f299d6d2209503e4ea7b8fc2103f 100644
--- a/chrome/browser/nacl_host/nacl_process_host.cc
+++ b/chrome/browser/nacl_host/nacl_process_host.cc
@@ -149,6 +149,7 @@ bool NaClProcessHost::PluginListener::OnMessageReceived(
NaClProcessHost::NaClProcessHost(const GURL& manifest_url,
int render_view_id,
uint32 permission_bits,
+ bool uses_irt,
bool off_the_record)
: manifest_url_(manifest_url),
permissions_(GetNaClPermissions(permission_bits)),
@@ -165,6 +166,7 @@ NaClProcessHost::NaClProcessHost(const GURL& manifest_url,
ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)),
enable_exception_handling_(false),
enable_debug_stub_(false),
+ uses_irt_(uses_irt),
off_the_record_(off_the_record),
enable_ipc_proxy_(false),
ALLOW_THIS_IN_INITIALIZER_LIST(ipc_plugin_listener_(this)),
@@ -706,9 +708,7 @@ bool NaClProcessHost::StartNaClExecution() {
params.enable_debug_stub = enable_debug_stub_ &&
NaClBrowser::GetInstance()->URLMatchesDebugPatterns(manifest_url_);
params.enable_ipc_proxy = enable_ipc_proxy_;
-
- base::PlatformFile irt_file = nacl_browser->IrtFile();
- CHECK_NE(irt_file, base::kInvalidPlatformFileValue);
+ params.uses_irt = uses_irt_;
const ChildProcessData& data = process_->GetData();
if (!ShareHandleToSelLdr(data.handle,
@@ -717,9 +717,14 @@ bool NaClProcessHost::StartNaClExecution() {
return false;
}
- // Send over the IRT file handle. We don't close our own copy!
- if (!ShareHandleToSelLdr(data.handle, irt_file, false, &params.handles))
- return false;
+ if (params.uses_irt) {
+ base::PlatformFile irt_file = nacl_browser->IrtFile();
+ CHECK_NE(irt_file, base::kInvalidPlatformFileValue);
+
+ // Send over the IRT file handle. We don't close our own copy!
+ if (!ShareHandleToSelLdr(data.handle, irt_file, false, &params.handles))
+ return false;
+ }
#if defined(OS_MACOSX)
// For dynamic loading support, NaCl requires a file descriptor that
« no previous file with comments | « chrome/browser/nacl_host/nacl_process_host.h ('k') | chrome/browser/renderer_host/chrome_render_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698