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

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

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/StylePropertySet.cpp
diff --git a/third_party/WebKit/Source/core/css/StylePropertySet.cpp b/third_party/WebKit/Source/core/css/StylePropertySet.cpp
index 2446f3f6b1069507df4b23b9ba1731c189efac36..da697fc023527855ff2c823ca54688a751297d3a 100644
--- a/third_party/WebKit/Source/core/css/StylePropertySet.cpp
+++ b/third_party/WebKit/Source/core/css/StylePropertySet.cpp
@@ -384,11 +384,13 @@ void MutableStylePropertySet::parseDeclarationList(
StyleSheetContents* contextStyleSheet) {
m_propertyVector.clear();
- CSSParserContext context(cssParserMode(),
- UseCounter::getFrom(contextStyleSheet));
+ CSSParserContext* context;
if (contextStyleSheet) {
- context = contextStyleSheet->parserContext();
- context.setMode(cssParserMode());
+ context = CSSParserContext::create(contextStyleSheet->parserContext(),
+ contextStyleSheet);
+ context->setMode(cssParserMode());
+ } else {
+ context = new CSSParserContext(cssParserMode());
}
CSSParser::parseDeclarationList(context, this, styleDeclaration);

Powered by Google App Engine
This is Rietveld 408576698