Simply GIFImageReader error handling
authorhclam@chromium.org <hclam@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Apr 2013 06:28:21 +0000 (06:28 +0000)
committerhclam@chromium.org <hclam@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Apr 2013 06:28:21 +0000 (06:28 +0000)
commit74f4879e5afd059bf8c123c82f5c77bb443344b4
treebad0fa0c9f65282c13a4ec55274863d32311bcb6
parent7e8463db2886a6b80c8cd5889c952c45d4efeb93
Simply GIFImageReader error handling
https://bugs.webkit.org/show_bug.cgi?id=113718

Reviewed by Adam Barth.

When GIFImageReader encounters a parsing error it should just return
without doing any more work. Current code saves a boolean before return,
this is not necessary.

Tested with existing unit tests.
Tested locally with ASAN build with 60k GIF images.

* platform/image-decoders/gif/GIFImageDecoder.cpp:
(WebCore::GIFImageDecoder::repetitionCount):
* platform/image-decoders/gif/GIFImageReader.cpp:
(GIFImageReader::decode):
* platform/image-decoders/gif/GIFImageReader.h:
(GIFImageReader::GIFImageReader):
(GIFImageReader):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@147392 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/image-decoders/gif/GIFImageDecoder.cpp
Source/WebCore/platform/image-decoders/gif/GIFImageReader.cpp
Source/WebCore/platform/image-decoders/gif/GIFImageReader.h