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

Unified Diff: third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp

Issue 2315923002: Lazy Parse CSS (Closed)
Patch Set: plug leaks Created 4 years, 3 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/parser/CSSTokenizer.cpp
diff --git a/third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp b/third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp
index 282bc3a549d9c0d555051d870bdcb76200bae74e..422a7c1ba74e607ef0d48dfe3e3ce67655c7a051 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp
@@ -18,7 +18,8 @@ namespace blink {
namespace blink {
CSSTokenizer::Scope::Scope(const String& string)
-: m_string(string)
+ : m_stringPool(new Vector<String>)
Timothy Loh 2016/09/26 05:18:01 Let's lazily allocate this -- I don't think it'll
Charlie Harrison 2016/09/26 22:14:45 Great point. Done.
+ , m_string(string)
{
// According to the spec, we should perform preprocessing here.
// See: http://dev.w3.org/csswg/css-syntax/#input-preprocessing
@@ -48,7 +49,8 @@ CSSTokenizer::Scope::Scope(const String& string)
}
CSSTokenizer::Scope::Scope(const String& string, CSSParserObserverWrapper& wrapper)
-: m_string(string)
+ : m_stringPool(new Vector<String>)
+ , m_string(string)
{
if (string.isEmpty())
return;

Powered by Google App Engine
This is Rietveld 408576698