Chromium Code Reviews| 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 626b08ccbc2180a503ef0301cf26996e011f5c43..c723c154ca598a1b19f0243a217919473d77441a 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/sdk/SourceMap.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/sdk/SourceMap.js |
| @@ -357,6 +357,20 @@ SDK.TextSourceMap = class { |
| } |
| /** |
| + * @param {string} sourceURL |
| + * @param {number} lineNumber |
| + * @param {number} columnNumber |
| + * @return {?SDK.SourceMapEntry} |
| + */ |
| + findReverseEntry(sourceURL, lineNumber, columnNumber) { |
|
dgozman
2017/05/04 00:04:56
Why this is not similar to JS? Which one is the co
|
| + var mappings = this._reversedMappings(sourceURL); |
| + var index = mappings.lowerBound( |
| + [lineNumber, columnNumber], |
| + (position, mapping) => position[0] - mapping.sourceLineNumber || position[1] - mapping.sourceColumnNumber); |
| + return index < mappings.length ? mappings[index] : null; |
| + } |
| + |
| + /** |
| * @return {!Array<!SDK.SourceMapEntry>} |
| */ |
| mappings() { |