Title: [230589] trunk/Source/WTF
- Revision
- 230589
- Author
- [email protected]
- Date
- 2018-04-12 11:56:29 -0700 (Thu, 12 Apr 2018)
Log Message
Remove unused crash hook functionality
https://bugs.webkit.org/show_bug.cgi?id=183369
Reviewed by Alexey Proskuryakov.
WTFSetCrashHook and WTFInstallReportBacktraceOnCrashHook are not used on any platforms and
can be removed.
* wtf/Assertions.cpp:
* wtf/Assertions.h:
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (230588 => 230589)
--- trunk/Source/WTF/ChangeLog 2018-04-12 18:50:33 UTC (rev 230588)
+++ trunk/Source/WTF/ChangeLog 2018-04-12 18:56:29 UTC (rev 230589)
@@ -1,3 +1,16 @@
+2018-04-12 Michael Catanzaro <[email protected]>
+
+ Remove unused crash hook functionality
+ https://bugs.webkit.org/show_bug.cgi?id=183369
+
+ Reviewed by Alexey Proskuryakov.
+
+ WTFSetCrashHook and WTFInstallReportBacktraceOnCrashHook are not used on any platforms and
+ can be removed.
+
+ * wtf/Assertions.cpp:
+ * wtf/Assertions.h:
+
2018-04-11 Said Abou-Hallawa <[email protected]>
Unreviewed, rolling out r230523.
Modified: trunk/Source/WTF/wtf/Assertions.cpp (230588 => 230589)
--- trunk/Source/WTF/wtf/Assertions.cpp 2018-04-12 18:50:33 UTC (rev 230588)
+++ trunk/Source/WTF/wtf/Assertions.cpp 2018-04-12 18:56:29 UTC (rev 230589)
@@ -251,19 +251,9 @@
out.print(stackTrace);
}
-static WTFCrashHookFunction globalHook = 0;
-
-void WTFSetCrashHook(WTFCrashHookFunction function)
-{
- globalHook = function;
-}
-
#if !defined(NDEBUG) || !OS(DARWIN)
void WTFCrash()
{
- if (globalHook)
- globalHook();
-
WTFReportBacktrace();
#if ASAN_ENABLED
__builtin_trap();
@@ -292,42 +282,6 @@
CRASH();
}
-#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
-}
-
bool WTFIsDebuggerAttached()
{
#if OS(DARWIN)
Modified: trunk/Source/WTF/wtf/Assertions.h (230588 => 230589)
--- trunk/Source/WTF/wtf/Assertions.h 2018-04-12 18:50:33 UTC (rev 230588)
+++ trunk/Source/WTF/wtf/Assertions.h 2018-04-12 18:56:29 UTC (rev 230589)
@@ -200,10 +200,6 @@
WTF_EXPORT_PRIVATE void WTFReportBacktrace(void);
WTF_EXPORT_PRIVATE void WTFPrintBacktrace(void** stack, int size);
-typedef void (*WTFCrashHookFunction)(void);
-WTF_EXPORT_PRIVATE void WTFSetCrashHook(WTFCrashHookFunction);
-WTF_EXPORT_PRIVATE void WTFInstallReportBacktraceOnCrashHook(void);
-
WTF_EXPORT_PRIVATE bool WTFIsDebuggerAttached(void);
#if COMPILER(MSVC)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes