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

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

Issue 2616093003: Make CSSParserContext be garbage collected. (Closed)
Patch Set: comments 1 Created 3 years, 11 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.h
diff --git a/third_party/WebKit/Source/core/css/StyleSheetContents.h b/third_party/WebKit/Source/core/css/StyleSheetContents.h
index b54a61b041ac3824a49ad12a0f697a4a275b12ad..caf0fcb28a32368f69150e5c66a70162f097e908 100644
--- a/third_party/WebKit/Source/core/css/StyleSheetContents.h
+++ b/third_party/WebKit/Source/core/css/StyleSheetContents.h
@@ -48,22 +48,22 @@ class StyleRuleNamespace;
class CORE_EXPORT StyleSheetContents
: public GarbageCollectedFinalized<StyleSheetContents> {
public:
- static StyleSheetContents* create(const CSSParserContext& context) {
+ static StyleSheetContents* create(const CSSParserContext* context) {
return new StyleSheetContents(0, String(), context);
}
static StyleSheetContents* create(const String& originalURL,
- const CSSParserContext& context) {
+ const CSSParserContext* context) {
return new StyleSheetContents(0, originalURL, context);
}
static StyleSheetContents* create(StyleRuleImport* ownerRule,
const String& originalURL,
- const CSSParserContext& context) {
+ const CSSParserContext* context) {
return new StyleSheetContents(ownerRule, originalURL, context);
}
~StyleSheetContents();
- const CSSParserContext& parserContext() const { return m_parserContext; }
+ const CSSParserContext* parserContext() const { return m_parserContext; }
const AtomicString& defaultNamespace() { return m_defaultNamespace; }
const AtomicString& namespaceURIFromPrefix(const AtomicString& prefix);
@@ -91,7 +91,7 @@ class CORE_EXPORT StyleSheetContents
// if there are none.
Document* anyOwnerDocument() const;
- const String& charset() const { return m_parserContext.charset(); }
+ const String& charset() const { return m_parserContext->charset(); }
bool loadCompleted() const;
bool hasFailedOrCanceledSubresources() const;
@@ -135,7 +135,7 @@ class CORE_EXPORT StyleSheetContents
// this style sheet. This property probably isn't useful for much except
// the JavaScript binding (which needs to use this value for security).
String originalURL() const { return m_originalURL; }
- const KURL& baseURL() const { return m_parserContext.baseURL(); }
+ const KURL& baseURL() const { return m_parserContext->baseURL(); }
unsigned ruleCount() const;
StyleRuleBase* ruleAt(unsigned index) const;
@@ -185,7 +185,7 @@ class CORE_EXPORT StyleSheetContents
private:
StyleSheetContents(StyleRuleImport* ownerRule,
const String& originalURL,
- const CSSParserContext&);
+ const CSSParserContext*);
StyleSheetContents(const StyleSheetContents&);
StyleSheetContents() = delete;
StyleSheetContents& operator=(const StyleSheetContents&) = delete;
@@ -215,7 +215,7 @@ class CORE_EXPORT StyleSheetContents
bool m_hasSingleOwnerDocument : 1;
bool m_isUsedFromTextCache : 1;
- CSSParserContext m_parserContext;
+ Member<const CSSParserContext> m_parserContext;
HeapHashSet<WeakMember<CSSStyleSheet>> m_loadingClients;
HeapHashSet<WeakMember<CSSStyleSheet>> m_completedClients;

Powered by Google App Engine
This is Rietveld 408576698