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_) { |