diff options
author | huanr@chromium.org <huanr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-12 06:48:24 +0000 |
---|---|---|
committer | huanr@chromium.org <huanr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-12 06:48:24 +0000 |
commit | 6cc67d7fdd6a666109bb82b411905c0f3415dce3 (patch) | |
tree | 21c05af725234691b28a27376286c021381aa95a | |
parent | 03bd6648b11dd3d915103f847feed28d0af4c7c2 (diff) | |
download | chromium_src-6cc67d7fdd6a666109bb82b411905c0f3415dce3.zip chromium_src-6cc67d7fdd6a666109bb82b411905c0f3415dce3.tar.gz chromium_src-6cc67d7fdd6a666109bb82b411905c0f3415dce3.tar.bz2 |
Suppress error dialog in headless mode when
running with --enable-dcheck.
Review URL: http://codereview.chromium.org/20292
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9649 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/app/chrome_dll_main.cc | 2 | ||||
-rw-r--r-- | chrome/common/logging_chrome.cc | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc index f4b4bb4e..08d3edb 100644 --- a/chrome/app/chrome_dll_main.cc +++ b/chrome/app/chrome_dll_main.cc @@ -296,7 +296,7 @@ int ChromeMain(int argc, const char** argv) { if (parsed_command_line.HasSwitch(switches::kSilentDumpOnDCHECK) && parsed_command_line.HasSwitch(switches::kEnableDCHECK)) { #if defined(OS_WIN) - logging::SetLogAssertHandler(ChromeAssert); + logging::SetLogReportHandler(ChromeAssert); #endif } #endif // NDEBUG diff --git a/chrome/common/logging_chrome.cc b/chrome/common/logging_chrome.cc index 575283b..6b34cbe 100644 --- a/chrome/common/logging_chrome.cc +++ b/chrome/common/logging_chrome.cc @@ -39,6 +39,8 @@ MSVC_DISABLE_OPTIMIZE(); static void SilentRuntimeAssertHandler(const std::string& str) { DebugUtil::BreakDebugger(); } +static void SilentRuntimeReportHandler(const std::string& str) { +} MSVC_ENABLE_OPTIMIZE(); // Suppresses error/assertion dialogs and enables the logging of @@ -48,6 +50,7 @@ static void SuppressDialogs() { return; logging::SetLogAssertHandler(SilentRuntimeAssertHandler); + logging::SetLogReportHandler(SilentRuntimeReportHandler); #if defined(OS_WIN) UINT new_flags = SEM_FAILCRITICALERRORS | |