OLD | NEW |
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 Loading... |
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 |
OLD | NEW |