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

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

Issue 2616093003: Make CSSParserContext be garbage collected. (Closed)
Patch Set: fix fuzzer compile again 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/CSSStyleSheet.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSStyleSheet.cpp b/third_party/WebKit/Source/core/css/CSSStyleSheet.cpp
index decf3122e874050427793152263540490b9d64ee..4420191583105b1419b10ff90c9ec831b8daf517 100644
--- a/third_party/WebKit/Source/core/css/CSSStyleSheet.cpp
+++ b/third_party/WebKit/Source/core/css/CSSStyleSheet.cpp
@@ -102,8 +102,8 @@ CSSStyleSheet* CSSStyleSheet::createInline(Node& ownerNode,
const KURL& baseURL,
const TextPosition& startPosition,
const String& encoding) {
- CSSParserContext parserContext(ownerNode.document(), nullptr, baseURL,
- encoding);
+ CSSParserContext* parserContext =
+ CSSParserContext::create(ownerNode.document(), baseURL, encoding);
StyleSheetContents* sheet =
StyleSheetContents::create(baseURL.getString(), parserContext);
return new CSSStyleSheet(sheet, ownerNode, true, startPosition);
@@ -264,8 +264,8 @@ unsigned CSSStyleSheet::insertRule(const String& ruleString,
String::number(length()) + ").");
return 0;
}
- CSSParserContext context(m_contents->parserContext(),
- UseCounter::getFrom(this));
+ const CSSParserContext* context =
+ CSSParserContext::createWithStyleSheet(m_contents->parserContext(), this);
StyleRuleBase* rule =
CSSParser::parseRule(context, m_contents.get(), ruleString);
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSStyleRule.cpp ('k') | third_party/WebKit/Source/core/css/DOMWindowCSS.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698