summaryrefslogtreecommitdiff
path: root/base/win/scoped_hdc.h
diff options
context:
space:
mode:
Diffstat (limited to 'base/win/scoped_hdc.h')
-rw-r--r--base/win/scoped_hdc.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/base/win/scoped_hdc.h b/base/win/scoped_hdc.h
index fa686dd050..890e34a82c 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();
}
}