Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1736)

Unified Diff: Source/wtf/Assertions.cpp

Issue 615593002: Remove unused functions WTFSetCrashHook, WTFInstallReportBacktraceOnCrashHook and WTFInvokeCrashHoo… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/wtf/Assertions.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/Assertions.cpp
diff --git a/Source/wtf/Assertions.cpp b/Source/wtf/Assertions.cpp
index 6b2ef310f1b49f71a372f0e1e4c2216d46564088..cc5e4deb07afbf3e13ad1d6a29e8a6153ec5697e 100644
--- a/Source/wtf/Assertions.cpp
+++ b/Source/wtf/Assertions.cpp
@@ -43,10 +43,6 @@
#include <stdlib.h>
#include <string.h>
-#if HAVE(SIGNAL_H)
-#include <signal.h>
-#endif
-
#if USE(CF)
#include <AvailabilityMacros.h>
#include <CoreFoundation/CFString.h>
@@ -295,55 +291,6 @@ void WTFPrintBacktrace(void** stack, int size)
}
}
-static WTFCrashHookFunction globalHook = 0;
-
-void WTFSetCrashHook(WTFCrashHookFunction function)
-{
- globalHook = function;
-}
-
-void WTFInvokeCrashHook()
-{
- if (globalHook)
- globalHook();
-}
-
-#if HAVE(SIGNAL_H)
-static NO_RETURN void dumpBacktraceSignalHandler(int sig)
-{
- WTFReportBacktrace();
- exit(128 + sig);
-}
-
-static void installSignalHandlersForFatalErrors(void (*handler)(int))
-{
- signal(SIGILL, handler); // 4: illegal instruction (not reset when caught).
- signal(SIGTRAP, handler); // 5: trace trap (not reset when caught).
- signal(SIGFPE, handler); // 8: floating point exception.
- signal(SIGBUS, handler); // 10: bus error.
- signal(SIGSEGV, handler); // 11: segmentation violation.
- signal(SIGSYS, handler); // 12: bad argument to system call.
- signal(SIGPIPE, handler); // 13: write on a pipe with no reader.
- signal(SIGXCPU, handler); // 24: exceeded CPU time limit.
- signal(SIGXFSZ, handler); // 25: exceeded file size limit.
-}
-
-static void resetSignalHandlersForFatalErrors()
-{
- installSignalHandlersForFatalErrors(SIG_DFL);
-}
-#endif
-
-void WTFInstallReportBacktraceOnCrashHook()
-{
-#if HAVE(SIGNAL_H)
- // Needed otherwise we are going to dump the stack trace twice
- // in case we hit an assertion.
- WTFSetCrashHook(&resetSignalHandlersForFatalErrors);
- installSignalHandlersForFatalErrors(&dumpBacktraceSignalHandler);
-#endif
-}
-
void WTFReportFatalError(const char* file, int line, const char* function, const char* format, ...)
{
va_list args;
« no previous file with comments | « Source/wtf/Assertions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698