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

Unified Diff: Source/platform/DragImage.cpp

Issue 540033002: use tryAllocPixels to check the result, allocPixels to require success (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.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
« no previous file with comments | « Source/core/frame/ImageBitmapTest.cpp ('k') | Source/platform/DragImageTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/DragImage.cpp
diff --git a/Source/platform/DragImage.cpp b/Source/platform/DragImage.cpp
index 82319cd5fa7df60e5eba1f51b55cf6f35f30ba9f..6e91bfbb6f48f5bbf3e1c2ae5475c437cb6bf68a 100644
--- a/Source/platform/DragImage.cpp
+++ b/Source/platform/DragImage.cpp
@@ -89,7 +89,7 @@ PassOwnPtr<DragImage> DragImage::create(Image* image, RespectImageOrientationEnu
destRect = destRect.transposedRect();
SkBitmap skBitmap;
- if (!skBitmap.allocN32Pixels(sizeRespectingOrientation.width(), sizeRespectingOrientation.height()))
+ if (!skBitmap.tryAllocN32Pixels(sizeRespectingOrientation.width(), sizeRespectingOrientation.height()))
return nullptr;
SkCanvas canvas(skBitmap);
« no previous file with comments | « Source/core/frame/ImageBitmapTest.cpp ('k') | Source/platform/DragImageTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698