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

Unified Diff: third_party/WebKit/Source/core/fetch/ImageResource.cpp

Issue 2253853002: Remove SharedBuffer::unlock() and keep Resource's SharedBuffer always locked (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use hasClientsOrObservers() for live_size Created 4 years, 4 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
Index: third_party/WebKit/Source/core/fetch/ImageResource.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ImageResource.cpp b/third_party/WebKit/Source/core/fetch/ImageResource.cpp
index c2ae4de0dcbc4abf3d499fc4c26480ec2e38f351..6a500029490395fd83f054c45160dd3f15705477 100644
--- a/third_party/WebKit/Source/core/fetch/ImageResource.cpp
+++ b/third_party/WebKit/Source/core/fetch/ImageResource.cpp
@@ -194,12 +194,6 @@ ResourcePriority ImageResource::priorityFromObservers()
return priority;
}
-bool ImageResource::isSafeToUnlock() const
-{
- // Note that |m_image| holds a reference to |data()| in addition to the one held by the Resource parent class.
- return !m_image || (m_image->hasOneRef() && data()->refCount() == 2);
-}
-
void ImageResource::destroyDecodedDataForFailedRevalidation()
{
clearImage();
@@ -275,8 +269,6 @@ bool ImageResource::willPaintBrokenImage() const
blink::Image* ImageResource::getImage()
{
- ASSERT(!isPurgeable());
-
if (errorOccurred()) {
// Returning the 1x broken image is non-ideal, but we cannot reliably access the appropriate
// deviceScaleFactor from here. It is critical that callers use ImageResource::brokenImage()
@@ -308,8 +300,6 @@ bool ImageResource::imageHasRelativeSize() const
LayoutSize ImageResource::imageSize(RespectImageOrientationEnum shouldRespectImageOrientation, float multiplier, SizeType sizeType)
{
- ASSERT(!isPurgeable());
-
if (!m_image)
return LayoutSize();
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ImageResource.h ('k') | third_party/WebKit/Source/core/fetch/MemoryCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698