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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sdk/SourceMap.js

Issue 1770263002: Devtools: resolve expressions in minified scripts with sourcemaps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/sdk/SourceMap.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/SourceMap.js b/third_party/WebKit/Source/devtools/front_end/sdk/SourceMap.js
index 2b76cbabd63ce62f2aebdbe4fbb9462cd2439ed5..133848709218cd3deedb69090bb18e14fbddbc94 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/SourceMap.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/SourceMap.js
@@ -228,7 +228,7 @@ WebInspector.SourceMap.prototype = {
*/
firstSourceLineMapping: function(sourceURL, lineNumber)
{
- var mappings = this._reversedMappings(sourceURL);
+ var mappings = this.reversedMappings(sourceURL);
var index = mappings.lowerBound(lineNumber, lineComparator);
if (index >= mappings.length || mappings[index].sourceLineNumber !== lineNumber)
return null;
@@ -257,7 +257,7 @@ WebInspector.SourceMap.prototype = {
* @param {string} sourceURL
* @return {!Array.<!WebInspector.SourceMap.Entry>}
*/
- _reversedMappings: function(sourceURL)
+ reversedMappings: function(sourceURL)
{
var mappings = this._reverseMappingsBySourceURL.get(sourceURL);
if (!mappings)
@@ -277,7 +277,13 @@ WebInspector.SourceMap.prototype = {
{
if (a.sourceLineNumber !== b.sourceLineNumber)
return a.sourceLineNumber - b.sourceLineNumber;
- return a.sourceColumnNumber - b.sourceColumnNumber;
+ if (a.sourceColumnNumber !== b.sourceColumnNumber)
+ return a.sourceColumnNumber - b.sourceColumnNumber;
+
+ if (a.lineNumber !== b.lineNumber)
+ return a.lineNumber - b.lineNumber;
+
+ return a.columnNumber - b.columnNumber;
}
},

Powered by Google App Engine
This is Rietveld 408576698