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

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

Issue 1653053002: Devtools: parse variables scopes and sourcemap them (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 8bab280f20f48180dc5210bc0aef7e6b645aede7..0a95e46a9021c51450ff8314b845e38665de7d88 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/SourceMap.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/SourceMap.js
@@ -39,6 +39,7 @@ function SourceMapV3()
/** @type {!Array.<!SourceMapV3.Section>|undefined} */ this.sections;
/** @type {string} */ this.mappings;
/** @type {string|undefined} */ this.sourceRoot;
+ /** @type {!Array.<string>|undefined} */ this.names;
}
/**
@@ -138,7 +139,7 @@ WebInspector.SourceMap.prototype = {
return this._sourceMappingURL;
},
- /**
+ /**
* @return {!Array.<string>}
*/
sources: function()
@@ -289,6 +290,7 @@ WebInspector.SourceMap.prototype = {
var nameIndex = 0;
var sources = [];
+ var names = map.names || [];
var sourceRoot = map.sourceRoot || "";
if (sourceRoot && !sourceRoot.endsWith("/"))
sourceRoot += "/";
@@ -337,7 +339,7 @@ WebInspector.SourceMap.prototype = {
if (!this._isSeparator(stringCharIterator.peek()))
nameIndex += this._decodeVLQ(stringCharIterator);
- this._mappings.push(new WebInspector.SourceMap.Entry(lineNumber, columnNumber, sourceURL, sourceLineNumber, sourceColumnNumber));
+ this._mappings.push(new WebInspector.SourceMap.Entry(lineNumber, columnNumber, sourceURL, sourceLineNumber, sourceColumnNumber, names[nameIndex]));
}
for (var i = 0; i < this._mappings.length; ++i) {
@@ -430,12 +432,14 @@ WebInspector.SourceMap.StringCharIterator.prototype = {
* @param {string=} sourceURL
* @param {number=} sourceLineNumber
* @param {number=} sourceColumnNumber
+ * @param {string=} name
*/
-WebInspector.SourceMap.Entry = function(lineNumber, columnNumber, sourceURL, sourceLineNumber, sourceColumnNumber)
+WebInspector.SourceMap.Entry = function(lineNumber, columnNumber, sourceURL, sourceLineNumber, sourceColumnNumber, name)
{
this.lineNumber = lineNumber;
this.columnNumber = columnNumber;
this.sourceURL = sourceURL;
this.sourceLineNumber = sourceLineNumber;
this.sourceColumnNumber = sourceColumnNumber;
+ this.name = name;
}

Powered by Google App Engine
This is Rietveld 408576698