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

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

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/DeferredImageDecoderTestWoPlatform.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTestWoPlatform.cpp b/third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTestWoPlatform.cpp
index 80bf2501d316de7d7584ea0795125992ecfff902..10887c1afbe5e759442f14486dbaebff67ab1e44 100644
--- a/third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTestWoPlatform.cpp
+++ b/third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTestWoPlatform.cpp
@@ -35,7 +35,7 @@ static void mixImages(const char* fileName, size_t bytesForFirstFrame, size_t la
RefPtr<SharedBuffer> file = readFile(fileName);
ASSERT_NE(file, nullptr);
- std::unique_ptr<DeferredImageDecoder> decoder = DeferredImageDecoder::create(*file.get(), ImageDecoder::AlphaPremultiplied, ImageDecoder::GammaAndColorProfileIgnored);
+ std::unique_ptr<DeferredImageDecoder> decoder = DeferredImageDecoder::create(ImageDecoder::determineImageType(*file.get()), ImageDecoder::AlphaPremultiplied, ImageDecoder::GammaAndColorProfileIgnored);
ASSERT_TRUE(decoder.get());
RefPtr<SharedBuffer> partialFile = SharedBuffer::create(file->data(), bytesForFirstFrame);

Powered by Google App Engine
This is Rietveld 408576698