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

Unified Diff: ui/gfx/mac/io_surface.cc

Issue 2858683004: Add LOG for when IOSurface allocation fails (Closed)
Patch Set: Created 3 years, 8 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: ui/gfx/mac/io_surface.cc
diff --git a/ui/gfx/mac/io_surface.cc b/ui/gfx/mac/io_surface.cc
index 4441138e4d8985b7c4bfd4e5ec0ca353f6239745..b10780249f693fcc976f75673616e67bf2cdf7e8 100644
--- a/ui/gfx/mac/io_surface.cc
+++ b/ui/gfx/mac/io_surface.cc
@@ -164,6 +164,11 @@ IOSurfaceRef CreateIOSurface(const gfx::Size& size, gfx::BufferFormat format) {
}
IOSurfaceRef surface = IOSurfaceCreate(properties);
+ if (!surface) {
+ LOG(ERROR) << "Failed to allocate IOSurface of size " << size.ToString()
+ << ".";
+ return nullptr;
+ }
// For unknown reasons, triggering this lock on OS X 10.9, on certain GPUs,
// causes PDFs to render incorrectly. Hopefully this check can be removed once
« 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