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

Unified Diff: third_party/WebKit/Source/core/css/resolver/ElementStyleResources.cpp

Issue 1865603004: Fix crash when setting invalid URL on content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pants Created 4 years, 8 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 | « third_party/WebKit/Source/core/css/CSSImageValue.cpp ('k') | 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/css/resolver/ElementStyleResources.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/ElementStyleResources.cpp b/third_party/WebKit/Source/core/css/resolver/ElementStyleResources.cpp
index 1dbe414bce11f775f982212d516bfff24405bbb2..118a61ec6697046dbab3ed4ea0342244c9f4ff9f 100644
--- a/third_party/WebKit/Source/core/css/resolver/ElementStyleResources.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/ElementStyleResources.cpp
@@ -134,11 +134,8 @@ void ElementStyleResources::loadPendingSVGDocuments(ComputedStyle* computedStyle
RawPtr<StyleImage> ElementStyleResources::loadPendingImage(StylePendingImage* pendingImage, CrossOriginAttributeValue crossOrigin)
{
- if (CSSImageValue* imageValue = pendingImage->cssImageValue()) {
- if (RawPtr<StyleImage> cachedImage = imageValue->cacheImage(m_document, crossOrigin))
- return cachedImage.release();
- return StyleInvalidImage::create(imageValue->url());
- }
+ if (CSSImageValue* imageValue = pendingImage->cssImageValue())
+ return imageValue->cacheImage(m_document, crossOrigin);
if (CSSImageGeneratorValue* imageGeneratorValue = pendingImage->cssImageGeneratorValue()) {
imageGeneratorValue->loadSubimages(m_document);
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSImageValue.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698