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

Unified Diff: third_party/WebKit/Source/core/dom/CSSSelectorWatch.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/dom/CSSSelectorWatch.cpp
diff --git a/third_party/WebKit/Source/core/dom/CSSSelectorWatch.cpp b/third_party/WebKit/Source/core/dom/CSSSelectorWatch.cpp
index 2570be9cb0e27ee525d195507fce21826869b37d..bd1ff5f126b00b792c9c44bc5a8c6895b360893d 100644
--- a/third_party/WebKit/Source/core/dom/CSSSelectorWatch.cpp
+++ b/third_party/WebKit/Source/core/dom/CSSSelectorWatch.cpp
@@ -151,9 +151,10 @@ void CSSSelectorWatch::watchCSSSelectors(const Vector<String>& selectors) {
StylePropertySet* callbackPropertySet =
ImmutableStylePropertySet::create(nullptr, 0, UASheetMode);
+ CSSParserContext* context = CSSParserContext::create(UASheetMode);
for (const auto& selector : selectors) {
- CSSSelectorList selectorList = CSSParser::parseSelector(
- CSSParserContext(UASheetMode, nullptr), nullptr, selector);
+ CSSSelectorList selectorList =
+ CSSParser::parseSelector(context, nullptr, selector);
if (!selectorList.isValid())
continue;

Powered by Google App Engine
This is Rietveld 408576698