| 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 8101ab0fef1540eb16919d787b4440596641d2bf..07c42d63717becd8fee2a615089e9f9b94174b1d 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/sdk/SourceMap.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/sdk/SourceMap.js
|
| @@ -83,6 +83,17 @@ SDK.SourceMapEntry = class {
|
| this.sourceColumnNumber = sourceColumnNumber;
|
| this.name = name;
|
| }
|
| +
|
| + /**
|
| + * @param {!SDK.SourceMapEntry} entry1
|
| + * @param {!SDK.SourceMapEntry} entry2
|
| + * @return {number}
|
| + */
|
| + static compare(entry1, entry2) {
|
| + if (entry1.lineNumber !== entry2.lineNumber)
|
| + return entry1.lineNumber - entry2.lineNumber;
|
| + return entry1.columnNumber - entry2.columnNumber;
|
| + }
|
| };
|
|
|
| /**
|
| @@ -481,6 +492,9 @@ SDK.TextSourceMap = class {
|
| this._mappings.push(new SDK.SourceMapEntry(
|
| lineNumber, columnNumber, sourceURL, sourceLineNumber, sourceColumnNumber, names[nameIndex]));
|
| }
|
| +
|
| + // As per spec, mappings are not necessarily sorted.
|
| + this._mappings.stableSort(SDK.SourceMapEntry.compare);
|
| }
|
|
|
| /**
|
|
|