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

Unified Diff: Source/platform/image-decoders/ImageDecoder.cpp

Issue 1161203004: blink: Allow image decodes to work without a Platform (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/image-decoders/ImageDecoder.cpp
diff --git a/Source/platform/image-decoders/ImageDecoder.cpp b/Source/platform/image-decoders/ImageDecoder.cpp
index 0982e7fa7ca83972844551151d6dc11a982a2158..9c7c2b9177503ef5f756763499ed913d77c4e759 100644
--- a/Source/platform/image-decoders/ImageDecoder.cpp
+++ b/Source/platform/image-decoders/ImageDecoder.cpp
@@ -88,7 +88,7 @@ PassOwnPtr<ImageDecoder> ImageDecoder::create(const SharedBuffer& data, ImageSou
const unsigned longestSignatureLength = sizeof("RIFF????WEBPVP") - 1;
ASSERT(longestSignatureLength == 14);
- size_t maxDecodedBytes = Platform::current()->maxDecodedImageBytes();
+ size_t maxDecodedBytes = Platform::current() ? Platform::current()->maxDecodedImageBytes() : noDecodedImageByteLimit;
char contents[longestSignatureLength];
if (copyFromSharedBuffer(contents, longestSignatureLength, data, 0) < longestSignatureLength)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698