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

Unified Diff: Source/platform/image-decoders/ImageFrame.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/platform/graphics/gpu/DrawingBuffer.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/image-decoders/ImageFrame.cpp
diff --git a/Source/platform/image-decoders/ImageFrame.cpp b/Source/platform/image-decoders/ImageFrame.cpp
index ed4538889ce5267f576d31a56eef14d4c8c43a32..4576eafffc3792fcc78fc810c0cfd7d2a25f9b57 100644
--- a/Source/platform/image-decoders/ImageFrame.cpp
+++ b/Source/platform/image-decoders/ImageFrame.cpp
@@ -107,7 +107,7 @@ bool ImageFrame::setSize(int newWidth, int newHeight)
ASSERT(!width() && !height());
m_bitmap.setInfo(SkImageInfo::MakeN32Premul(newWidth, newHeight));
- if (!m_bitmap.allocPixels(m_allocator, 0))
+ if (!m_bitmap.tryAllocPixels(m_allocator, 0))
return false;
zeroFillPixelData();
« no previous file with comments | « Source/platform/graphics/gpu/DrawingBuffer.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698