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

Unified Diff: third_party/WebKit/Source/core/html/ImageDocument.cpp

Issue 1801543002: HTMLImageElement::cachedImage() may return null in ImageDocument construction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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: 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 845152f0d3de10c18d6022ea074d79a59a661c3c..842ceb13abda40c7166c8ef164ec99b65312cfe9 100644
--- a/third_party/WebKit/Source/core/html/ImageDocument.cpp
+++ b/third_party/WebKit/Source/core/html/ImageDocument.cpp
@@ -227,7 +227,7 @@ void ImageDocument::createDocumentStructure()
m_imageElement->setLoadingImageDocument();
m_imageElement->setSrc(url().getString());
body->appendChild(m_imageElement.get());
- if (loader())
+ if (loader() && m_imageElement->cachedImage())
Nate Chapin 2016/03/15 21:27:53 Do we know why this can be null? It's not immediat
yhirano 2016/03/16 08:40:48 ImageResource::fetch can return null. In ImageLoad
m_imageElement->cachedImage()->responseReceived(loader()->response(), nullptr);
if (shouldShrinkToFit()) {
« 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