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

Unified Diff: third_party/WebKit/Source/devtools/front_end/common/Text.js

Issue 1887913002: DevTools: improve identifier extraction in SourceMapNamesResolver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/Text.js
diff --git a/third_party/WebKit/Source/devtools/front_end/common/Text.js b/third_party/WebKit/Source/devtools/front_end/common/Text.js
index 3e62f17a72147c7ff52d1ed7026a37253cc1dc09..cc49351d8dac9da1b960ab825743538c618c89b2 100644
--- a/third_party/WebKit/Source/devtools/front_end/common/Text.js
+++ b/third_party/WebKit/Source/devtools/front_end/common/Text.js
@@ -129,6 +129,16 @@ WebInspector.TextCursor.prototype = {
},
/**
+ * @param {number} offset
+ */
+ resetTo: function(offset)
+ {
+ this._offset = offset;
+ this._lineNumber = this._lineEndings.lowerBound(offset);
+ this._columnNumber = this._lineNumber ? this._offset - this._lineEndings[this._lineNumber - 1] - 1 : this._offset;
+ },
+
+ /**
* @return {number}
*/
lineNumber: function()

Powered by Google App Engine
This is Rietveld 408576698