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

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

Issue 1996293002: Make ImportedStyleSheetClient GarbageCollected (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « third_party/WebKit/Source/core/css/StyleRuleImport.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/StyleRuleImport.cpp
diff --git a/third_party/WebKit/Source/core/css/StyleRuleImport.cpp b/third_party/WebKit/Source/core/css/StyleRuleImport.cpp
index 2bafa099f0efe3e97a819a5ba9595515e2f9d650..fce49e8554ac9b031461327acb7728c48786cd13 100644
--- a/third_party/WebKit/Source/core/css/StyleRuleImport.cpp
+++ b/third_party/WebKit/Source/core/css/StyleRuleImport.cpp
@@ -38,7 +38,7 @@ StyleRuleImport* StyleRuleImport::create(const String& href, MediaQuerySet* medi
StyleRuleImport::StyleRuleImport(const String& href, MediaQuerySet* media)
: StyleRuleBase(Import)
, m_parentStyleSheet(nullptr)
- , m_styleSheetClient(this)
+ , m_styleSheetClient(new ImportedStyleSheetClient(this))
, m_strHref(href)
, m_mediaQueries(media)
, m_loading(false)
@@ -56,7 +56,7 @@ StyleRuleImport::~StyleRuleImport()
void StyleRuleImport::dispose()
{
if (m_resource)
- m_resource->removeClient(&m_styleSheetClient);
+ m_resource->removeClient(m_styleSheetClient);
haraken 2016/05/20 09:21:10 Can you move this to a pre-finalizer of ImportedSt
yhirano 2016/05/23 11:29:05 In this case StyleRuleImport has the resource and
m_resource = nullptr;
}
@@ -140,7 +140,7 @@ void StyleRuleImport::requestStyleSheet()
if (m_parentStyleSheet && m_parentStyleSheet->loadCompleted() && rootSheet == m_parentStyleSheet)
m_parentStyleSheet->startLoadingDynamicSheet();
m_loading = true;
- m_resource->addClient(&m_styleSheetClient);
+ m_resource->addClient(m_styleSheetClient);
}
}
« no previous file with comments | « third_party/WebKit/Source/core/css/StyleRuleImport.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698