diff options
Diffstat (limited to 'webkit')
| -rw-r--r-- | webkit/tools/test_shell/test_shell_main.cc | 3 | ||||
| -rw-r--r-- | webkit/tools/test_shell/test_shell_platform_delegate_mac.mm | 41 | ||||
| -rw-r--r-- | webkit/tools/test_shell/test_shell_switches.cc | 4 | ||||
| -rw-r--r-- | webkit/tools/test_shell/test_shell_switches.h | 1 |
4 files changed, 23 insertions, 26 deletions
diff --git a/webkit/tools/test_shell/test_shell_main.cc b/webkit/tools/test_shell/test_shell_main.cc index d409d8e..58e202d 100644 --- a/webkit/tools/test_shell/test_shell_main.cc +++ b/webkit/tools/test_shell/test_shell_main.cc @@ -94,8 +94,7 @@ int main(int argc, char* argv[]) { // Suppress abort message in v8 library in debugging mode (but not // actually under a debugger). V8 calls abort() when it hits // assertion errors. - if (suppress_error_dialogs && - !parsed_command_line.HasSwitch(test_shell::kGDB)) { + if (suppress_error_dialogs) { platform.SuppressErrorReporting(); } diff --git a/webkit/tools/test_shell/test_shell_platform_delegate_mac.mm b/webkit/tools/test_shell/test_shell_platform_delegate_mac.mm index 208caf1..a88bf83 100644 --- a/webkit/tools/test_shell/test_shell_platform_delegate_mac.mm +++ b/webkit/tools/test_shell/test_shell_platform_delegate_mac.mm @@ -150,23 +150,12 @@ static void InstallLayoutTestColorProfile(void) { // Save the starting profile, and hook in as best we can to make sure when // we exit, it's restored (use atexit() so direct calls to exit() call us). gUsersColorProfile = previousProfile; + + // Currently, layout test mode implies suppressing errors in + // test_shell_main.cc. So we call SuppressErrorReporting() and install all the + // appropriate signal handlers. If that ever changes we should find a way to + // restore the color profile on crashes without suppressing errors. atexit(RestoreUsersColorProfile); - // The less scary signals... - signal(SIGINT, SimpleSignalHandler); - signal(SIGHUP, SimpleSignalHandler); - signal(SIGTERM, SimpleSignalHandler); - // And now the scary ones... - signal(SIGABRT, CrashSignalHandler); // abort() called - signal(SIGILL, CrashSignalHandler); // 4: illegal instruction - signal(SIGTRAP, CrashSignalHandler); // 5: trace trap - signal(SIGEMT, CrashSignalHandler); // 7: EMT instruction - signal(SIGFPE, CrashSignalHandler); // 8: floating point exception - signal(SIGBUS, CrashSignalHandler); // 10: bus error - signal(SIGSEGV, CrashSignalHandler); // 11: segmentation violation - signal(SIGSYS, CrashSignalHandler); // 12: bad argument to system call - signal(SIGPIPE, CrashSignalHandler); // 13: write on a pipe with no reader - signal(SIGXCPU, CrashSignalHandler); // 24: exceeded CPU time limit - signal(SIGXFSZ, CrashSignalHandler); // 25: exceeded file size limit } #if OBJC_API_VERSION == 2 @@ -278,7 +267,21 @@ void TestShellPlatformDelegate::SelectUnifiedTheme() { void TestShellPlatformDelegate::SuppressErrorReporting() { // If we die during tests, we don't want to be spamming the user's crash - // reporter. Set our exception port to null. - task_set_exception_ports(mach_task_self(), EXC_MASK_ALL, MACH_PORT_NULL, - EXCEPTION_DEFAULT, THREAD_STATE_NONE); + // reporter. + // The less scary signals... + signal(SIGINT, SimpleSignalHandler); + signal(SIGHUP, SimpleSignalHandler); + signal(SIGTERM, SimpleSignalHandler); + // And now the scary ones... + signal(SIGABRT, CrashSignalHandler); // abort() called + signal(SIGILL, CrashSignalHandler); // 4: illegal instruction + signal(SIGTRAP, CrashSignalHandler); // 5: trace trap + signal(SIGEMT, CrashSignalHandler); // 7: EMT instruction + signal(SIGFPE, CrashSignalHandler); // 8: floating point exception + signal(SIGBUS, CrashSignalHandler); // 10: bus error + signal(SIGSEGV, CrashSignalHandler); // 11: segmentation violation + signal(SIGSYS, CrashSignalHandler); // 12: bad argument to system call + signal(SIGPIPE, CrashSignalHandler); // 13: write on a pipe with no reader + signal(SIGXCPU, CrashSignalHandler); // 24: exceeded CPU time limit + signal(SIGXFSZ, CrashSignalHandler); // 25: exceeded file size limit } diff --git a/webkit/tools/test_shell/test_shell_switches.cc b/webkit/tools/test_shell/test_shell_switches.cc index 0884929..9bda588 100644 --- a/webkit/tools/test_shell/test_shell_switches.cc +++ b/webkit/tools/test_shell/test_shell_switches.cc @@ -64,10 +64,6 @@ const wchar_t kAllowScriptsToCloseWindows[] = L"allow-scripts-to-close-windows"; extern const wchar_t kCheckLayoutTestSystemDeps[] = L"check-layout-test-sys-deps"; -// If set, we are running under GDB so allow a certain class of errors -// to happen even if in layout test mode. -extern const wchar_t kGDB[] = L"gdb"; - // Make functions of the Profiler class available in javascript extern const wchar_t kProfiler[] = L"profiler"; diff --git a/webkit/tools/test_shell/test_shell_switches.h b/webkit/tools/test_shell/test_shell_switches.h index be995d1..597615f 100644 --- a/webkit/tools/test_shell/test_shell_switches.h +++ b/webkit/tools/test_shell/test_shell_switches.h @@ -28,7 +28,6 @@ extern const wchar_t kEnableFileCookies[]; extern const wchar_t kEnableTracing[]; extern const wchar_t kAllowScriptsToCloseWindows[]; extern const wchar_t kCheckLayoutTestSystemDeps[]; -extern const wchar_t kGDB[]; extern const wchar_t kProfiler[]; } // namespace test_shell |
