diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-18 04:30:14 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-18 04:30:14 +0000 |
commit | 54823b0f1ec8d65bf64423a64f727bbc8eb023a1 (patch) | |
tree | d8cabd5ef2f1413201b930520b923985db5caf25 /chrome/renderer | |
parent | 538ddce9c0e36665f2d34b6f7a731407afbcb554 (diff) | |
download | chromium_src-54823b0f1ec8d65bf64423a64f727bbc8eb023a1.zip chromium_src-54823b0f1ec8d65bf64423a64f727bbc8eb023a1.tar.gz chromium_src-54823b0f1ec8d65bf64423a64f727bbc8eb023a1.tar.bz2 |
In release mode, trigger a SIGABRT rather than a SIGTRAP for fatal log errors, i.e. CHECK(false). Also enable tests to make sure we assert/crash as expected.
BUG=none
TEST=Chrome in release mode generates crash dumps when CHECK() fails. See UI tests: AssertionTest.*:CheckFalseTest.*:RendererCrashTest.*
Review URL: http://codereview.chromium.org/830003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41912 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r-- | chrome/renderer/renderer_main.cc | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/chrome/renderer/renderer_main.cc b/chrome/renderer/renderer_main.cc index 2556ba7..90a25ea 100644 --- a/chrome/renderer/renderer_main.cc +++ b/chrome/renderer/renderer_main.cc @@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#if defined(OS_MACOSX) +#include <signal.h> +#include <unistd.h> +#endif // OS_MACOSX + #include "app/hi_res_timer_manager.h" #include "app/l10n_util.h" #include "app/resource_bundle.h" @@ -31,8 +36,6 @@ #if defined(OS_MACOSX) #include "base/eintr_wrapper.h" #include "chrome/app/breakpad_mac.h" -#include <signal.h> -#include <unistd.h> #endif // OS_MACOSX #if defined(USE_LINUX_BREAKPAD) @@ -152,6 +155,15 @@ static void HandleRendererErrorTestParameters(const CommandLine& command_line) { DCHECK(false); } + +#if !defined(OFFICIAL_BUILD) + // This parameter causes an assertion too. + if (command_line.HasSwitch(switches::kRendererCheckFalseTest)) { + CHECK(false); + } +#endif // !defined(OFFICIAL_BUILD) + + // This parameter causes a null pointer crash (crash reporter trigger). if (command_line.HasSwitch(switches::kRendererCrashTest)) { int* bad_pointer = NULL; |