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

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

Issue 2289333003: CSS Lazy Parsing perf jobs (Closed)
Patch Set: CL for src perf tryjob to run blink_style.top_25 benchmark on all-android platform(s) Created 4 years, 2 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.h
diff --git a/third_party/WebKit/Source/core/css/parser/CSSTokenizer.h b/third_party/WebKit/Source/core/css/parser/CSSTokenizer.h
index 005c2255a5ae0585c07ee17f4c5802a17387773a..5496a5ace1c592eecf573e6c3dd468581e231865 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSTokenizer.h
+++ b/third_party/WebKit/Source/core/css/parser/CSSTokenizer.h
@@ -29,17 +29,24 @@ class CORE_EXPORT CSSTokenizer {
DISALLOW_NEW();
public:
+ Scope() {}
Scope(const String&);
Scope(const String&, CSSParserObserverWrapper&); // For the inspector
CSSParserTokenRange tokenRange();
unsigned tokenCount();
+ std::unique_ptr<Vector<String>> releaseEscapedStrings() {
+ return std::move(m_stringPool);
+ }
+
private:
- void storeString(const String& string) { m_stringPool.append(string); }
+ void storeString(const String&);
Vector<CSSParserToken, 32> m_tokens;
- // We only allocate strings when escapes are used.
- Vector<String> m_stringPool;
+
+ // We only allocate strings when escapes are used. This member is lazily
+ // initialized.
+ std::unique_ptr<Vector<String>> m_stringPool;
String m_string;
friend class CSSTokenizer;

Powered by Google App Engine
This is Rietveld 408576698