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

Unified Diff: WebCore/platform/image-decoders/gif/GIFImageDecoder.cpp

Issue 3573008: Merge 68446 - WebCore: ImageDecoderSkia.cpp needs to check for allocator fail... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/517/
Patch Set: Created 10 years, 2 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: WebCore/platform/image-decoders/gif/GIFImageDecoder.cpp
===================================================================
--- WebCore/platform/image-decoders/gif/GIFImageDecoder.cpp (revision 69026)
+++ WebCore/platform/image-decoders/gif/GIFImageDecoder.cpp (working copy)
@@ -356,7 +356,8 @@
if ((prevMethod == RGBA32Buffer::DisposeNotSpecified) || (prevMethod == RGBA32Buffer::DisposeKeep)) {
// Preserve the last frame as the starting state for this frame.
- buffer->copyBitmapData(*prevBuffer);
+ if (!buffer->copyBitmapData(*prevBuffer))
+ return setFailed();
} else {
// We want to clear the previous frame to transparent, without
// affecting pixels in the image outside of the frame.
@@ -369,7 +370,8 @@
return setFailed();
} else {
// Copy the whole previous buffer, then clear just its frame.
- buffer->copyBitmapData(*prevBuffer);
+ if (!buffer->copyBitmapData(*prevBuffer))
+ return setFailed();
for (int y = prevRect.y(); y < prevRect.bottom(); ++y) {
for (int x = prevRect.x(); x < prevRect.right(); ++x)
buffer->setRGBA(x, y, 0, 0, 0, 0);
« no previous file with comments | « WebCore/platform/image-decoders/ImageDecoder.cpp ('k') | WebCore/platform/image-decoders/qt/RGBA32BufferQt.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698