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

Unified Diff: third_party/WebKit/Source/core/style/ContentData.h

Issue 1607733004: Fix crash when using disallowed URLs in image sets for content CSS property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/resolver/ElementStyleResources.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/style/ContentData.h
diff --git a/third_party/WebKit/Source/core/style/ContentData.h b/third_party/WebKit/Source/core/style/ContentData.h
index e4347a05cc7d83000d76741e8ceaecec26b7f819..1947050f38e362be24a815244ff5b3e1444a3cad 100644
--- a/third_party/WebKit/Source/core/style/ContentData.h
+++ b/third_party/WebKit/Source/core/style/ContentData.h
@@ -76,7 +76,7 @@ class ImageContentData final : public ContentData {
public:
const StyleImage* image() const { return m_image.get(); }
StyleImage* image() { return m_image.get(); }
- void setImage(PassRefPtrWillBeRawPtr<StyleImage> image) { m_image = image; }
+ void setImage(PassRefPtrWillBeRawPtr<StyleImage> image) { ASSERT(image); m_image = image; }
bool isImage() const override { return true; }
LayoutObject* createLayoutObject(Document&, ComputedStyle&) const override;
@@ -94,6 +94,7 @@ private:
ImageContentData(PassRefPtrWillBeRawPtr<StyleImage> image)
: m_image(image)
{
+ ASSERT(m_image);
}
PassOwnPtrWillBeRawPtr<ContentData> cloneInternal() const override
« no previous file with comments | « third_party/WebKit/Source/core/css/resolver/ElementStyleResources.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698