diff options
author | japhet <japhet@chromium.org> | 2016-02-02 13:49:04 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-02 21:50:32 +0000 |
commit | 078b8da5052922b9d4ab7b7f9294a8050bdc3286 (patch) | |
tree | c22e91ae5f76f53223b5c15e95b3e780ec3eedfb /third_party/WebKit/Source/core/layout/LayoutImageResourceStyleImage.cpp | |
parent | a10d3478dd53d4421673a0e97686785b36455ac0 (diff) | |
download | chromium_src-078b8da5052922b9d4ab7b7f9294a8050bdc3286.zip chromium_src-078b8da5052922b9d4ab7b7f9294a8050bdc3286.tar.gz chromium_src-078b8da5052922b9d4ab7b7f9294a8050bdc3286.tar.bz2 |
Make Resource RefCountedWillBeGarbageCollectedFinalized
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/1423033012
Cr-Commit-Position: refs/heads/master@{#373046}
Diffstat (limited to 'third_party/WebKit/Source/core/layout/LayoutImageResourceStyleImage.cpp')
-rw-r--r-- | third_party/WebKit/Source/core/layout/LayoutImageResourceStyleImage.cpp | 3 |
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 |