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

Unified Diff: third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoder.cpp

Issue 2382143004: Purge image frame after checking for sufficient data. (Closed)
Patch Set: Rebasing. Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoder.cpp
diff --git a/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoder.cpp b/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoder.cpp
index 22113622bbdf8970c25b35660d93a5b8dc9b0f4a..a2d98ffdc191e1375027bbd7d9aad8f71f847cdb 100644
--- a/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoder.cpp
+++ b/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoder.cpp
@@ -335,12 +335,12 @@ void GIFImageDecoder::decode(size_t index) {
return;
}
- if (m_purgeAggressively)
- clearCacheExceptFrame(*i);
-
// We need more data to continue decoding.
if (m_frameBufferCache[*i].getStatus() != ImageFrame::FrameComplete)
break;
+
+ if (m_purgeAggressively)
+ clearCacheExceptFrame(*i);
}
// It is also a fatal error if all data is received and we have decoded all
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698