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

Side by Side Diff: tools/CrashHandler.cpp

Issue 821643006: upstream hooking into google3 crash handler for better stacktraces (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include "CrashHandler.h" 1 #include "CrashHandler.h"
2 2
3 #include "SkTypes.h" 3 #include "SkTypes.h"
4 4
5 #include <stdlib.h> 5 #include <stdlib.h>
6 6
7 // Disable SetupCrashHandler() unless SK_CRASH_HANDLER is defined. 7 // Disable SetupCrashHandler() unless SK_CRASH_HANDLER is defined.
8 #ifndef SK_CRASH_HANDLER 8 #ifndef SK_CRASH_HANDLER
9 void SetupCrashHandler() { } 9 void SetupCrashHandler() { }
10 10
11 #elif defined(GOOGLE3)
12 #include "base/process_state.h"
13 void SetupCrashHandler() { InstallSignalHandlers(); }
14
11 #else 15 #else
12 16
13 #if defined(SK_BUILD_FOR_MAC) 17 #if defined(SK_BUILD_FOR_MAC)
14 18
15 // We only use local unwinding, so we can define this to select a faster implementation. 19 // We only use local unwinding, so we can define this to select a faster implementation.
16 #define UNW_LOCAL_ONLY 20 #define UNW_LOCAL_ONLY
17 #include <libunwind.h> 21 #include <libunwind.h>
18 #include <cxxabi.h> 22 #include <cxxabi.h>
19 23
20 static void handler(int sig) { 24 static void handler(int sig) {
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 void SetupCrashHandler() { 176 void SetupCrashHandler() {
173 SetUnhandledExceptionFilter(handler); 177 SetUnhandledExceptionFilter(handler);
174 } 178 }
175 179
176 #else // We asked for SK_CRASH_HANDLER, but it's not Mac, Linux, or Windows . Sorry! 180 #else // We asked for SK_CRASH_HANDLER, but it's not Mac, Linux, or Windows . Sorry!
177 181
178 void SetupCrashHandler() { } 182 void SetupCrashHandler() { }
179 183
180 #endif 184 #endif
181 #endif // SK_CRASH_HANDLER 185 #endif // SK_CRASH_HANDLER
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698