| 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 d3fb21bb4965fa5cbc3f17601c632912be9995ae..5c50aa5383bd903121dc2e122f80a85bd5a56c45 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())
|
|
|