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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sources/JavaScriptBreakpointsSidebarPane.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/sources/JavaScriptBreakpointsSidebarPane.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptBreakpointsSidebarPane.js b/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptBreakpointsSidebarPane.js
index a7873ee21d1913aa96da90efa52719df94c7d47e..c4049b877141f673fad2d9ca040254698fcd4e85 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptBreakpointsSidebarPane.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptBreakpointsSidebarPane.js
@@ -89,9 +89,9 @@ WebInspector.JavaScriptBreakpointsSidebarPane.prototype = {
{
var lineNumber = uiLocation.lineNumber
var columnNumber = uiLocation.columnNumber;
- var contentString = new String(content);
- if (lineNumber < contentString.lineCount()) {
- var lineText = contentString.lineAt(lineNumber);
+ var text = new WebInspector.Text(content || "");
+ if (lineNumber < text.lineCount()) {
+ var lineText = text.lineAt(lineNumber);
var maxSnippetLength = 200;
var snippetStartIndex = columnNumber > 100 ? columnNumber : 0;
snippetElement.textContent = lineText.substr(snippetStartIndex).trimEnd(maxSnippetLength);

Powered by Google App Engine
This is Rietveld 408576698