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

Unified Diff: third_party/WebKit/Source/devtools/front_end/es_tree/AcornTokenizer.js

Issue 1809533003: DevTools: remove illusionary caching from String.prototype.lineEndings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: String.prototype.lineEndings -> String.prototype.computeLineEndings Created 4 years, 9 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/devtools/front_end/es_tree/AcornTokenizer.js
diff --git a/third_party/WebKit/Source/devtools/front_end/es_tree/AcornTokenizer.js b/third_party/WebKit/Source/devtools/front_end/es_tree/AcornTokenizer.js
index 3516911bf5b54153710f71cc0c733f92509ec2b7..f0755fc04fbfe1265858b4010fee946fafdb477f 100644
--- a/third_party/WebKit/Source/devtools/front_end/es_tree/AcornTokenizer.js
+++ b/third_party/WebKit/Source/devtools/front_end/es_tree/AcornTokenizer.js
@@ -11,7 +11,7 @@ WebInspector.AcornTokenizer = function(content)
this._content = content;
this._comments = [];
this._tokenizer = acorn.tokenizer(this._content, { ecmaVersion: 6, onComment: this._comments });
- this._lineEndings = this._content.lineEndings();
+ this._lineEndings = this._content.computeLineEndings();
this._lineNumber = 0;
this._tokenLineStart = 0;
this._tokenLineEnd = 0;

Powered by Google App Engine
This is Rietveld 408576698