Index: third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp |
diff --git a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp |
index e7eac4b4a3f696ab1f6871dafc99fab7d4d1b4e3..a42a39a3749ac7e710e8eafbb71472899a394c3f 100644 |
--- a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp |
+++ b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp |
@@ -407,13 +407,8 @@ void ImageDecoder::UpdateAggressivePurging(size_t index) { |
// As we decode we will learn the total number of frames, and thus total |
// possible image memory used. |
- const uint64_t frame_area = DecodedSize().Area(); |
- const uint64_t frame_memory_usage = frame_area * 4; // 4 bytes per pixel |
- if (frame_memory_usage / 4 != frame_area) { // overflow occurred |
Srirama
2017/05/30 07:07:39
though it looks like it is doing nothing, this wou
|
- purge_aggressively_ = true; |
- return; |
- } |
- |
+ const uint64_t frame_memory_usage = |
+ DecodedSize().Area() * 4; // 4 bytes per pixel |
const uint64_t total_memory_usage = frame_memory_usage * index; |
if (total_memory_usage / frame_memory_usage != index) { // overflow occurred |
purge_aggressively_ = true; |