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

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

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
Index: third_party/WebKit/Source/core/css/StyleRuleImport.h
diff --git a/third_party/WebKit/Source/core/css/StyleRuleImport.h b/third_party/WebKit/Source/core/css/StyleRuleImport.h
index 705acf8553f261015fb344e38ede3d3ead8d6a43..64cad61a54aee655c1336b7ee4eb924252bf582b 100644
--- a/third_party/WebKit/Source/core/css/StyleRuleImport.h
+++ b/third_party/WebKit/Source/core/css/StyleRuleImport.h
@@ -54,11 +54,10 @@ public:
DECLARE_TRACE_AFTER_DISPATCH();
private:
- // FIXME: inherit from StyleSheetResourceClient directly to eliminate raw back pointer, as there are no space savings in this.
+ // FIXME: inherit from StyleSheetResourceClient directly to eliminate back pointer, as there are no space savings in this.
// NOTE: We put the StyleSheetResourceClient in a member instead of inheriting from it
// to avoid adding a vptr to StyleRuleImport.
- class ImportedStyleSheetClient final : public StyleSheetResourceClient {
- DISALLOW_NEW();
+ class ImportedStyleSheetClient final : public GarbageCollectedFinalized<ImportedStyleSheetClient>, public StyleSheetResourceClient {
public:
ImportedStyleSheetClient(StyleRuleImport* ownerRule) : m_ownerRule(ownerRule) { }
~ImportedStyleSheetClient() override { }
@@ -78,7 +77,6 @@ private:
};
void setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CSSStyleSheetResource*);
- friend class ImportedStyleSheetClient;
StyleRuleImport(const String& href, MediaQuerySet*);
@@ -86,7 +84,7 @@ private:
Member<StyleSheetContents> m_parentStyleSheet;
- ImportedStyleSheetClient m_styleSheetClient;
+ Member<ImportedStyleSheetClient> m_styleSheetClient;
String m_strHref;
Member<MediaQuerySet> m_mediaQueries;
Member<StyleSheetContents> m_styleSheet;

Powered by Google App Engine
This is Rietveld 408576698