| Index: third_party/WebKit/Source/core/html/ImageDocument.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/ImageDocument.cpp b/third_party/WebKit/Source/core/html/ImageDocument.cpp
|
| index aca5533bb18256f4104464c3d7f67b98b32d0b56..d27f49109a52735d54cb3dfe0fe43a06960614d4 100644
|
| --- a/third_party/WebKit/Source/core/html/ImageDocument.cpp
|
| +++ b/third_party/WebKit/Source/core/html/ImageDocument.cpp
|
| @@ -144,7 +144,9 @@ void ImageDocumentParser::appendBytes(const char* data, size_t length)
|
|
|
| if (document()->cachedImage()) {
|
| RELEASE_ASSERT(length <= std::numeric_limits<unsigned>::max());
|
| - document()->cachedImage()->appendData(data, length);
|
| + // If decoding has already failed, there's no point in sending additional data to the ImageResource.
|
| + if (document()->cachedImage()->getStatus() != Resource::DecodeError)
|
| + document()->cachedImage()->appendData(data, length);
|
| }
|
|
|
| if (!isDetached())
|
|
|