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

Unified Diff: third_party/WebKit/Source/platform/graphics/BitmapImage.cpp

Issue 2257513002: Refactor ImageDecoder factories (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 4 years, 4 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
Index: third_party/WebKit/Source/platform/graphics/BitmapImage.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp b/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp
index 6bd22c923ea3ab9b77ed1e4398427c6af54cfd5c..4e0d82778559c193233e4903edf3607760c1ce31 100644
--- a/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp
+++ b/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp
@@ -198,9 +198,9 @@ Image::SizeAvailability BitmapImage::setData(PassRefPtr<SharedBuffer> data, bool
if (!length)
return SizeAvailable;
- // If ImageSource::setData() returns Invalid, we know that this is a decode error.
+ // If ImageSource::setData() fails, we know that this is a decode error.
// Report size available so that it gets registered as such in ImageResource.
- if (m_source.setData(*data, allDataReceived) == ImageDecoder::SniffResult::Invalid)
+ if (!m_source.setData(data, allDataReceived))
return SizeAvailable;
return dataChanged(allDataReceived);

Powered by Google App Engine
This is Rietveld 408576698