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

Unified Diff: third_party/WebKit/Source/core/css/StyleSheetContents.cpp

Issue 1807323002: [WeakMemoryCache 1a] Make Reference from Inspector to Resource weak, remove removedFromMemoryCache() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove some comments Created 4 years, 7 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/css/StyleSheetContents.cpp
diff --git a/third_party/WebKit/Source/core/css/StyleSheetContents.cpp b/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
index ca65457166c6776323414df8a8f041c7f292a668..2545e41d3cbe37909b5d63a978e8145ea927b356 100644
--- a/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
+++ b/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
@@ -62,7 +62,7 @@ StyleSheetContents::StyleSheetContents(StyleRuleImport* ownerRule, const String&
, m_hasSyntacticallyValidCSSHeader(true)
, m_didLoadErrorOccur(false)
, m_isMutable(false)
- , m_isInMemoryCache(false)
+ , m_isReferencedFromResource(false)
, m_hasFontFaceRule(false)
, m_hasMediaQueries(false)
, m_hasSingleOwnerDocument(true)
@@ -81,7 +81,7 @@ StyleSheetContents::StyleSheetContents(const StyleSheetContents& o)
, m_hasSyntacticallyValidCSSHeader(o.m_hasSyntacticallyValidCSSHeader)
, m_didLoadErrorOccur(false)
, m_isMutable(false)
- , m_isInMemoryCache(false)
+ , m_isReferencedFromResource(false)
, m_hasFontFaceRule(o.m_hasFontFaceRule)
, m_hasMediaQueries(o.m_hasMediaQueries)
, m_hasSingleOwnerDocument(true)
@@ -572,17 +572,11 @@ void StyleSheetContents::removeSheetFromCache(Document* document)
document->styleEngine().removeSheet(this);
}
-void StyleSheetContents::addedToMemoryCache()
+void StyleSheetContents::setReferencedFromResource(bool referenced)
{
- ASSERT(!m_isInMemoryCache);
+ ASSERT(referenced != m_isReferencedFromResource);
ASSERT(isCacheable());
- m_isInMemoryCache = true;
-}
-
-void StyleSheetContents::removedFromMemoryCache()
-{
- ASSERT(isCacheable());
- m_isInMemoryCache = false;
+ m_isReferencedFromResource = referenced;
}
RuleSet& StyleSheetContents::ensureRuleSet(const MediaQueryEvaluator& medium, AddRuleFlags addRuleFlags)
« no previous file with comments | « third_party/WebKit/Source/core/css/StyleSheetContents.h ('k') | third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698