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

Unified Diff: content/common/cursors/webcursor_mac.mm

Issue 545513002: tryAllocPixels returns bool, allocPixels requires success (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
Index: content/common/cursors/webcursor_mac.mm
diff --git a/content/common/cursors/webcursor_mac.mm b/content/common/cursors/webcursor_mac.mm
index c0a7885c6ef30e4199695a4edf97653060b3898f..2c0c2aa87effed73dfc10899d380e983bc5b0aa8 100644
--- a/content/common/cursors/webcursor_mac.mm
+++ b/content/common/cursors/webcursor_mac.mm
@@ -151,7 +151,7 @@ NSCursor* CreateCustomCursor(const std::vector<char>& custom_data,
}
SkBitmap bitmap;
- if (bitmap.allocN32Pixels(size.width(), size.height()) && data)
+ if (bitmap.tryAllocN32Pixels(size.width(), size.height()) && data)
memcpy(bitmap.getAddr32(0, 0), data, data_size);
else
bitmap.eraseARGB(0, 0, 0, 0);

Powered by Google App Engine
This is Rietveld 408576698