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

Unified Diff: Source/core/fetch/Resource.cpp

Issue 221813005: Do not count MemoryCache reference in Resource::hasOneHandle (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | « Source/core/fetch/Resource.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/Resource.cpp
diff --git a/Source/core/fetch/Resource.cpp b/Source/core/fetch/Resource.cpp
index 8de53059160fd0e7cf8cb2198f29297b80c8bb0f..23ee131bb7230f3b82dfbcc17d270bd01189425a 100644
--- a/Source/core/fetch/Resource.cpp
+++ b/Source/core/fetch/Resource.cpp
@@ -748,6 +748,11 @@ void Resource::revalidationFailed()
clearResourceToRevalidate();
}
+bool Resource::hasOneHandle() const
+{
+ return m_handleCount == 1 || (memoryCache()->contains(this) && m_handleCount == 2);
+}
+
void Resource::registerHandle(ResourcePtrBase* h)
{
assertAlive();
« no previous file with comments | « Source/core/fetch/Resource.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698