Chromium Code Reviews

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorCSSAgent.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.
Jump to:
View side-by-side diff with in-line comments
Index: third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
index 4a33eb8f9fd3c3681f191a87f324661d38987007..dbceeaa1f9a3dd1456cef86367e456801adc3ebc 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
@@ -110,8 +110,8 @@ String createShorthandValue(Document* document,
StyleSheetContents* styleSheetContents =
StyleSheetContents::create(strictCSSParserContext());
String text = " div { " + shorthand + ": " + oldText + "; }";
- CSSParser::parseSheet(CSSParserContext(*document, nullptr),
- styleSheetContents, text);
+ CSSParser::parseSheet(new CSSParserContext(*document), styleSheetContents,
+ text);
CSSStyleSheet* styleSheet = CSSStyleSheet::create(styleSheetContents);
CSSStyleRule* rule = toCSSStyleRule(styleSheet->item(0));

Powered by Google App Engine