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

Unified Diff: third_party/WebKit/Source/devtools/front_end/common/ContentProvider.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/common/ContentProvider.js
diff --git a/third_party/WebKit/Source/devtools/front_end/common/ContentProvider.js b/third_party/WebKit/Source/devtools/front_end/common/ContentProvider.js
index 439ac8868333a153b6e775f4782ad04ed91cbe8d..0a162ba985b20daf03682b96b227a9b2b975f648 100644
--- a/third_party/WebKit/Source/devtools/front_end/common/ContentProvider.js
+++ b/third_party/WebKit/Source/devtools/front_end/common/ContentProvider.js
@@ -79,10 +79,10 @@ WebInspector.ContentProvider.performSearchInContent = function(content, query, c
{
var regex = createSearchRegex(query, caseSensitive, isRegex);
- var contentString = new String(content);
+ var text = new WebInspector.Text(content);
var result = [];
- for (var i = 0; i < contentString.lineCount(); ++i) {
- var lineContent = contentString.lineAt(i);
+ for (var i = 0; i < text.lineCount(); ++i) {
+ var lineContent = text.lineAt(i);
regex.lastIndex = 0;
if (regex.exec(lineContent))
result.push(new WebInspector.ContentProvider.SearchMatch(i, lineContent));
« no previous file with comments | « third_party/WebKit/Source/devtools/devtools.gypi ('k') | third_party/WebKit/Source/devtools/front_end/common/Text.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698