diff options
author | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-13 17:07:59 +0000 |
---|---|---|
committer | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-13 17:07:59 +0000 |
commit | 20c74302b227db28d64ca8394be25f00b4f06fa2 (patch) | |
tree | 46cf75c8f113a7bd15de7fa8359b7077dcaf37e2 /base | |
parent | b3f901e83c60041fa6fd822364bd3580a710e200 (diff) | |
download | chromium_src-20c74302b227db28d64ca8394be25f00b4f06fa2.zip chromium_src-20c74302b227db28d64ca8394be25f00b4f06fa2.tar.gz chromium_src-20c74302b227db28d64ca8394be25f00b4f06fa2.tar.bz2 |
Disable Native Crash reporting on OS X, till we enable Breakpad integration.
See http://crbug.com/7652
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9757 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/base.xcodeproj/project.pbxproj | 4 | ||||
-rw-r--r-- | base/debug_util.h | 10 | ||||
-rw-r--r-- | base/debug_util_mac.cc | 35 |
3 files changed, 49 insertions, 0 deletions
diff --git a/base/base.xcodeproj/project.pbxproj b/base/base.xcodeproj/project.pbxproj index f00553d..fb82a52 100644 --- a/base/base.xcodeproj/project.pbxproj +++ b/base/base.xcodeproj/project.pbxproj @@ -182,6 +182,7 @@ B5637CB20EF2D79A004EF692 /* process_util_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7BD8F4A00E65AA2400034DE9 /* process_util_unittest.cc */; }; B57E4D780E9C26340090055D /* idletimer_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = B57E4D770E9C26340090055D /* idletimer_unittest.cc */; }; B5A8618E0EC1257900B332C2 /* clipboard.cc in Sources */ = {isa = PBXBuildFile; fileRef = B5A8618D0EC1257900B332C2 /* clipboard.cc */; }; + B5C4B9C90F44C2AD003F59F9 /* debug_util_mac.cc in Sources */ = {isa = PBXBuildFile; fileRef = B5C4B9C80F44C2AD003F59F9 /* debug_util_mac.cc */; }; B5D544AB0EAFB7E000272A1C /* sys_string_conversions_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = B5D544AA0EAFB7E000272A1C /* sys_string_conversions_unittest.cc */; }; B5E8F6CC0EBFB38E008DD1E9 /* scoped_clipboard_writer.cc in Sources */ = {isa = PBXBuildFile; fileRef = B5E8F6CB0EBFB38E008DD1E9 /* scoped_clipboard_writer.cc */; }; BA0F69870E79D7980079A8A1 /* thread_local_storage_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = BA0F69860E79D7980079A8A1 /* thread_local_storage_unittest.cc */; }; @@ -660,6 +661,7 @@ B57D788E0F26983200685566 /* scoped_file.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = scoped_file.h; sourceTree = "<group>"; }; B57E4D770E9C26340090055D /* idletimer_unittest.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = idletimer_unittest.cc; sourceTree = "<group>"; }; B5A8618D0EC1257900B332C2 /* clipboard.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = clipboard.cc; sourceTree = "<group>"; }; + B5C4B9C80F44C2AD003F59F9 /* debug_util_mac.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = debug_util_mac.cc; sourceTree = "<group>"; }; B5D544AA0EAFB7E000272A1C /* sys_string_conversions_unittest.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sys_string_conversions_unittest.cc; sourceTree = "<group>"; }; B5E8F6CA0EBFB38E008DD1E9 /* scoped_clipboard_writer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = scoped_clipboard_writer.h; sourceTree = "<group>"; }; B5E8F6CB0EBFB38E008DD1E9 /* scoped_clipboard_writer.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = scoped_clipboard_writer.cc; sourceTree = "<group>"; }; @@ -895,6 +897,7 @@ 825402F30D92D1AC0006B936 /* debug_on_start.h */, 825402F20D92D1AC0006B936 /* debug_util.cc */, 825402F10D92D1AC0006B936 /* debug_util.h */, + B5C4B9C80F44C2AD003F59F9 /* debug_util_mac.cc */, 7B78CE100E53131800609465 /* debug_util_posix.cc */, 536092F70ECE474500D1B91E /* dmg_fp.h */, 536092F80ECE474500D1B91E /* dtoa.cc */, @@ -1430,6 +1433,7 @@ E48A05F70E3F61B300172919 /* command_line.cc in Sources */, 824653680DC12CEC007C2BAA /* condition_variable_posix.cc in Sources */, 7B78CE250E5314A000609465 /* debug_util.cc in Sources */, + B5C4B9C90F44C2AD003F59F9 /* debug_util_mac.cc in Sources */, 7B78CE120E53131800609465 /* debug_util_posix.cc in Sources */, 536092FA0ECE474500D1B91E /* dtoa.cc in Sources */, AB4FA13A0F2A101100D6572F /* event_recorder_stubs.cc in Sources */, diff --git a/base/debug_util.h b/base/debug_util.h index b61cb1e..8ae0a2b 100644 --- a/base/debug_util.h +++ b/base/debug_util.h @@ -51,6 +51,16 @@ class DebugUtil { // Break into the debugger, assumes a debugger is present. static void BreakDebugger(); + +#if defined(OS_MACOSX) + // On OS X, it can take a really long time for the OS Crash handler to + // process a Chrome crash. This translates into a long wait till the process + // actually dies. + // This method disables OS Crash reporting entireley. + // TODO(playmobil): Remove this when we have Breakpad integration enabled - + // see http://crbug.com/7652 + static void DisableOSCrashDumps(); +#endif // defined(OS_MACOSX) }; #endif // BASE_DEBUG_UTIL_H_ diff --git a/base/debug_util_mac.cc b/base/debug_util_mac.cc new file mode 100644 index 0000000..3a1b184 --- /dev/null +++ b/base/debug_util_mac.cc @@ -0,0 +1,35 @@ +// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "base/debug_util.h" + +#include <signal.h> + +#include "base/basictypes.h" + +static void ExitSignalHandler(int sig) { + exit(128 + sig); +} + +// static +void DebugUtil::DisableOSCrashDumps() { + int signals_to_intercept[] ={SIGINT, + SIGHUP, + SIGTERM, + SIGABRT, + SIGILL, + SIGTRAP, + SIGEMT, + SIGFPE, + SIGBUS, + SIGSEGV, + SIGSYS, + SIGPIPE, + SIGXCPU, + SIGXFSZ}; + // For all these signals, just wire thing sup so we exit immediately. + for (size_t i = 0; i < arraysize(signals_to_intercept); ++i) { + signal(signals_to_intercept[i], ExitSignalHandler); + } +} |