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

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

Issue 389553002: Refactoring: Make ~CSSStyleSheetResource empty. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add an assertion Created 6 years, 5 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/CSSStyleSheetResource.h ('k') | Source/core/fetch/Resource.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/CSSStyleSheetResource.cpp
diff --git a/Source/core/fetch/CSSStyleSheetResource.cpp b/Source/core/fetch/CSSStyleSheetResource.cpp
index 2eab0d54d4a890a7be1cc5089b0d5f850c8c55ba..5d86e05c1784f3e57cad6e5b386e67d938b64d50 100644
--- a/Source/core/fetch/CSSStyleSheetResource.cpp
+++ b/Source/core/fetch/CSSStyleSheetResource.cpp
@@ -49,8 +49,15 @@ CSSStyleSheetResource::CSSStyleSheetResource(const ResourceRequest& resourceRequ
CSSStyleSheetResource::~CSSStyleSheetResource()
{
+ // Make sure dispose() was cllaed before destruction.
+ ASSERT(!m_parsedStyleSheetCache);
+}
+
+void CSSStyleSheetResource::dispose()
+{
if (m_parsedStyleSheetCache)
m_parsedStyleSheetCache->removedFromMemoryCache();
+ m_parsedStyleSheetCache.clear();
}
void CSSStyleSheetResource::didAddClient(ResourceClient* c)
« no previous file with comments | « Source/core/fetch/CSSStyleSheetResource.h ('k') | Source/core/fetch/Resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698