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

Unified Diff: content/common/cursors/webcursor.cc

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.cc
diff --git a/content/common/cursors/webcursor.cc b/content/common/cursors/webcursor.cc
index e9e27f948d235321beff71061e2d0bd575171be1..85721fdd0e2bae52ef010ff19ae60df6eb764d36 100644
--- a/content/common/cursors/webcursor.cc
+++ b/content/common/cursors/webcursor.cc
@@ -243,7 +243,7 @@ void WebCursor::ImageFromCustomData(SkBitmap* image) const {
if (custom_data_.empty())
return;
- if (!image->allocN32Pixels(custom_size_.width(), custom_size_.height()))
+ if (!image->tryAllocN32Pixels(custom_size_.width(), custom_size_.height()))
return;
memcpy(image->getPixels(), &custom_data_[0], custom_data_.size());
}

Powered by Google App Engine
This is Rietveld 408576698