diff options
author | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-19 22:15:01 +0000 |
---|---|---|
committer | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-19 22:15:01 +0000 |
commit | 2a73befc8674465d8c648e44f3953da9a97c1c79 (patch) | |
tree | 0d570c772621595b385ad9f85a2b60e048128329 /webkit | |
parent | f86b4eda2b99df9118d4b523546bd0696d09ac7d (diff) | |
download | chromium_src-2a73befc8674465d8c648e44f3953da9a97c1c79.zip chromium_src-2a73befc8674465d8c648e44f3953da9a97c1c79.tar.gz chromium_src-2a73befc8674465d8c648e44f3953da9a97c1c79.tar.bz2 |
Switch an error handler from calling exit() to simply crashing.
I don't have any reason to believe this is currently being hit. However I am going through the codebase trying to eliminate sources of potential "hidden crashes" -- situations where our process dies but we don't receive any crash reports.
BUG=118656
Review URL: http://codereview.chromium.org/9718003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127552 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/support/webkit_support_gfx.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/webkit/support/webkit_support_gfx.cc b/webkit/support/webkit_support_gfx.cc index cf9fb1d..2a62b72 100644 --- a/webkit/support/webkit_support_gfx.cc +++ b/webkit/support/webkit_support_gfx.cc @@ -25,7 +25,10 @@ extern "C" { namespace webkit_support { // Define macro here to make webkit_support_gfx independent of target base. -#define NOTREACHED(msg) exit(1) +// Note that the NOTREACHED() macro will result in a crash. This is preferable +// to calling exit() / abort(), since the latter may not surfce the problem as +// crash reports, making it hard to tell where the problem is. +#define NOTREACHED(msg) *((int*)0) = 3 #define DCHECK(condition) \ if (!(condition)) fprintf(stderr, "DCHECK failed: " #condition ".") |