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

Unified Diff: base/win/scoped_hdc.h

Issue 2452933002: Collect information on the dump when GetDC fails. (Closed)
Patch Set: Remove excessive check for |header|. Created 4 years, 1 month 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 | « base/debug/gdi_debug_util_win.cc ('k') | skia/ext/skia_utils_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
}
« no previous file with comments | « base/debug/gdi_debug_util_win.cc ('k') | skia/ext/skia_utils_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698