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

Unified Diff: chrome/browser/nacl_host/nacl_process_host.cc

Issue 10836197: NaCl: Permit using the debug exception handler when the debug stub is enabled (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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/browser/nacl_host/nacl_process_host.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c1bd9293bee0dc9251ee6b5ae101a9dba964682e..f6edd8fcf7ef983a90c458a0b3c6a5bf86579a65 100644
--- a/chrome/browser/nacl_host/nacl_process_host.cc
+++ b/chrome/browser/nacl_host/nacl_process_host.cc
@@ -128,6 +128,7 @@ NaClProcessHost::NaClProcessHost(const GURL& manifest_url, bool off_the_record)
internal_(new NaClInternal()),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)),
enable_exception_handling_(false),
+ enable_debug_stub_(false),
off_the_record_(off_the_record) {
process_.reset(content::BrowserChildProcessHost::Create(
content::PROCESS_TYPE_NACL_LOADER, this));
@@ -145,6 +146,8 @@ NaClProcessHost::NaClProcessHost(const GURL& manifest_url, bool off_the_record)
getenv("NACL_UNTRUSTED_EXCEPTION_HANDLING") != NULL) {
enable_exception_handling_ = true;
}
+ enable_debug_stub_ = CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableNaClDebug);
enable_ipc_proxy_ = CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableNaClIPCProxy);
@@ -622,8 +625,7 @@ bool NaClProcessHost::StartNaClExecution() {
params.validation_cache_key = nacl_browser->GetValidationCacheKey();
params.version = chrome::VersionInfo().CreateVersionString();
params.enable_exception_handling = enable_exception_handling_;
- params.enable_debug_stub =
- CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableNaClDebug);
+ params.enable_debug_stub = enable_debug_stub_;
params.enable_ipc_proxy = enable_ipc_proxy_;
base::PlatformFile irt_file = nacl_browser->IrtFile();
@@ -735,9 +737,9 @@ void NaClProcessHost::OnAttachDebugExceptionHandler(const std::string& info,
bool NaClProcessHost::AttachDebugExceptionHandler(const std::string& info,
IPC::Message* reply_msg) {
- if (!enable_exception_handling_) {
+ if (!enable_exception_handling_ && !enable_debug_stub_) {
DLOG(ERROR) <<
- "Exception handling requested by NaCl process when not enabled";
+ "Debug exception handler requested by NaCl process when not enabled";
return false;
}
if (debug_exception_handler_requested_) {
« no previous file with comments | « chrome/browser/nacl_host/nacl_process_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698