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

Unified Diff: third_party/WebKit/Source/platform/graphics/Image.h

Issue 2173873003: Cancel image loads if decoding failed (attempt #2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix UAF Created 4 years, 5 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/Image.h
diff --git a/third_party/WebKit/Source/platform/graphics/Image.h b/third_party/WebKit/Source/platform/graphics/Image.h
index 63ede0ac4007cc9ff844fb4178a59c7ffc7f0bdd..ee10fe1121c75b0f894a6d142d950e2c8faf2370 100644
--- a/third_party/WebKit/Source/platform/graphics/Image.h
+++ b/third_party/WebKit/Source/platform/graphics/Image.h
@@ -101,8 +101,12 @@ public:
int height() const { return size().height(); }
virtual bool getHotSpot(IntPoint&) const { return false; }
- virtual bool setData(PassRefPtr<SharedBuffer> data, bool allDataReceived);
- virtual bool dataChanged(bool /*allDataReceived*/) { return false; }
+ enum SizeAvailability {
+ SizeAvailable,
+ SizeUnavailable
+ };
+ virtual SizeAvailability setData(PassRefPtr<SharedBuffer> data, bool allDataReceived);
+ virtual SizeAvailability dataChanged(bool /*allDataReceived*/) { return SizeUnavailable; }
virtual String filenameExtension() const { return String(); } // null string if unknown

Powered by Google App Engine
This is Rietveld 408576698