summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/Source/core/layout/LayoutImageResourceStyleImage.cpp
diff options
context:
space:
mode:
authorjaphet <japhet@chromium.org>2016-02-08 15:55:46 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-08 23:57:03 +0000
commit486e98700f552d7a5c4fbc1b3a9b5e9f2a6cf934 (patch)
treee04a9c3ca30964b56200fd13953090dfb457845f /third_party/WebKit/Source/core/layout/LayoutImageResourceStyleImage.cpp
parent10c4829364ecf21538a40cdbcb23018561cc648a (diff)
downloadchromium_src-486e98700f552d7a5c4fbc1b3a9b5e9f2a6cf934.zip
chromium_src-486e98700f552d7a5c4fbc1b3a9b5e9f2a6cf934.tar.gz
chromium_src-486e98700f552d7a5c4fbc1b3a9b5e9f2a6cf934.tar.bz2
Make Resource RefCountedWillBeGarbageCollectedFinalized, attempt #2
Resource's lifetime is currently managed by an unholy mix of factors that would ideally be represented in a more canonical way. Historically, some of this was necessary, and it was glossed over because of ResourcePtr which, in addition to keeping the Resource alive, performed a key part of revalidation handling in the case of a 304. Now that ResourcePtr's revalidation behavior has been removed, standardize Resource's lifetime management. BUG=571190 Review URL: https://codereview.chromium.org/1667843003 Cr-Commit-Position: refs/heads/master@{#374220}
Diffstat (limited to 'third_party/WebKit/Source/core/layout/LayoutImageResourceStyleImage.cpp')
-rw-r--r--third_party/WebKit/Source/core/layout/LayoutImageResourceStyleImage.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/third_party/WebKit/Source/core/layout/LayoutImageResourceStyleImage.cpp b/third_party/WebKit/Source/core/layout/LayoutImageResourceStyleImage.cpp
index 36add16..be7e3e0 100644
--- a/third_party/WebKit/Source/core/layout/LayoutImageResourceStyleImage.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutImageResourceStyleImage.cpp
@@ -41,6 +41,7 @@ LayoutImageResourceStyleImage::LayoutImageResourceStyleImage(StyleImage* styleIm
LayoutImageResourceStyleImage::~LayoutImageResourceStyleImage()
{
+ ASSERT(!m_cachedImage);
}
void LayoutImageResourceStyleImage::initialize(LayoutObject* layoutObject)
@@ -57,7 +58,7 @@ void LayoutImageResourceStyleImage::shutdown()
{
ASSERT(m_layoutObject);
m_styleImage->removeClient(m_layoutObject);
- m_cachedImage = 0;
+ m_cachedImage = nullptr;
}
PassRefPtr<Image> LayoutImageResourceStyleImage::image(const IntSize& size, float zoom) const