From 402bed6e628639154a4dc3789ee52588eacd2981 Mon Sep 17 00:00:00 2001 From: "jvoung@chromium.org" Date: Fri, 7 Mar 2014 08:33:09 +0000 Subject: Add flag to avoid blocking the PNaCl translator when chrome NaCl GDB flag is on. Augment the NaCl GDB mask to avoid blocking the PNaCl translator in addition to secure shell. Make this the default. This has the side-effect of identifying the translator as separate from the application in chrome's task manager, since the "url" is changed for these helper NaCl modules from the application manifest to something like chrome://pnacl-translator/x86-64/pnacl-llc.nexe. BUG= https://code.google.com/p/nativeclient/issues/detail?id=3765 Review URL: https://codereview.chromium.org/176813010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255543 0039d316-1c4b-4281-b951-d872f2087c98 --- components/nacl/browser/nacl_process_host.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'components') diff --git a/components/nacl/browser/nacl_process_host.cc b/components/nacl/browser/nacl_process_host.cc index eae244b..d2b1ff1 100644 --- a/components/nacl/browser/nacl_process_host.cc +++ b/components/nacl/browser/nacl_process_host.cc @@ -341,8 +341,15 @@ void NaClProcessHost::EarlyStartup() { UMA_HISTOGRAM_BOOLEAN( "NaCl.enable-nacl-debug", cmd->HasSwitch(switches::kEnableNaClDebug)); - NaClBrowser::GetDelegate()->SetDebugPatterns( - cmd->GetSwitchValueASCII(switches::kNaClDebugMask)); + std::string nacl_debug_mask = + cmd->GetSwitchValueASCII(switches::kNaClDebugMask); + // By default, exclude debugging SSH and the PNaCl translator. + // about::flags only allows empty flags as the default, so replace + // the empty setting with the default. To debug all apps, use a wild-card. + if (nacl_debug_mask.empty()) { + nacl_debug_mask = "!*://*/*ssh_client.nmf,chrome://pnacl-translator/*"; + } + NaClBrowser::GetDelegate()->SetDebugPatterns(nacl_debug_mask); } void NaClProcessHost::Launch( -- cgit v1.1