Index: base/win/scoped_hdc.h |
diff --git a/base/win/scoped_hdc.h b/base/win/scoped_hdc.h |
index fa686dd050004af0e216d98417b29f240bf78d29..890e34a82c5b0dfa8d82964f6c4b69fdf7d331d6 100644 |
--- a/base/win/scoped_hdc.h |
+++ b/base/win/scoped_hdc.h |
@@ -7,6 +7,7 @@ |
#include <windows.h> |
+#include "base/debug/gdi_debug_util_win.h" |
#include "base/logging.h" |
#include "base/macros.h" |
#include "base/win/scoped_handle.h" |
@@ -28,7 +29,8 @@ class ScopedGetDC { |
// If GetDC(NULL) returns NULL, something really bad has happened, like |
// GDI handle exhaustion. In this case Chrome is going to behave badly no |
// matter what, so we may as well just force a crash now. |
- CHECK(hdc_); |
+ if (!hdc_) |
+ base::debug::CollectGDIUsageAndDie(); |
} |
} |