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

Unified Diff: webkit/support/webkit_support.cc

Issue 9863056: Properly crash when triggering an ASSERT() in debug DRT. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/support/webkit_support.cc
diff --git a/webkit/support/webkit_support.cc b/webkit/support/webkit_support.cc
index 08da0171680de5330944b826537704683a3d0abe..fd2a0982a4c1ebdea77aebe4d3e6a2a95177c4c0 100644
--- a/webkit/support/webkit_support.cc
+++ b/webkit/support/webkit_support.cc
@@ -89,14 +89,11 @@ void UnitTestAssertHandler(const std::string& str) {
FAIL() << str;
}
-void InitLogging(bool enable_gp_fault_error_box) {
- logging::SetLogAssertHandler(UnitTestAssertHandler);
-
+void InitLogging() {
#if defined(OS_WIN)
if (!::IsDebuggerPresent()) {
- UINT new_flags = SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX;
- if (!enable_gp_fault_error_box)
- new_flags |= SEM_NOGPFAULTERRORBOX;
+ UINT new_flags = SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX
+ | SEM_NOGPFAULTERRORBOX;
// Preserve existing error mode, as discussed at
// http://blogs.msdn.com/oldnewthing/archive/2004/07/27/198410.aspx
@@ -137,10 +134,12 @@ class TestEnvironment {
TestEnvironment(bool unit_test_mode,
base::AtExitManager* existing_at_exit_manager) {
- if (!unit_test_mode) {
+ if (unit_test_mode) {
+ logging::SetLogAssertHandler(UnitTestAssertHandler);
+ } else {
// The existing_at_exit_manager must be not NULL.
at_exit_manager_.reset(existing_at_exit_manager);
- InitLogging(false);
+ InitLogging();
}
main_message_loop_.reset(new MessageLoopType);
// TestWebKitPlatformSupport must be instantiated after MessageLoopType.
« 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