| Index: third_party/WebKit/Source/devtools/front_end/bindings/CompilerScriptMapping.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/bindings/CompilerScriptMapping.js b/third_party/WebKit/Source/devtools/front_end/bindings/CompilerScriptMapping.js
|
| index f153f2c750eb66a7f91e50d60589da58e8934d02..8ff4c7f32d14d7a318d4747efe8115547a205353 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/bindings/CompilerScriptMapping.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/bindings/CompilerScriptMapping.js
|
| @@ -150,16 +150,19 @@
|
| * @param {!Workspace.UISourceCode} uiSourceCode
|
| * @param {number} lineNumber
|
| * @param {number} columnNumber
|
| - * @return {!Array<!SDK.DebuggerModel.Location>}
|
| - */
|
| - uiLocationToRawLocations(uiSourceCode, lineNumber, columnNumber) {
|
| + * @return {?SDK.DebuggerModel.Location}
|
| + */
|
| + uiLocationToRawLocation(uiSourceCode, lineNumber, columnNumber) {
|
| var script = uiSourceCode[Bindings.CompilerScriptMapping._scriptSymbol];
|
| - var sourceMap = script && this._sourceMapManager.sourceMapForClient(script);
|
| - if (!sourceMap)
|
| - return [];
|
| - return sourceMap.mappingsForLine(uiSourceCode.url(), lineNumber)
|
| - .map(entry => this._debuggerModel.createRawLocation(script, entry.lineNumber, entry.columnNumber))
|
| - .filter(location => !!location);
|
| + if (!script)
|
| + return null;
|
| + var sourceMap = this._sourceMapManager.sourceMapForClient(script);
|
| + if (!sourceMap)
|
| + return null;
|
| + var entry = sourceMap.firstSourceLineMapping(uiSourceCode.url(), lineNumber);
|
| + if (!entry)
|
| + return null;
|
| + return this._debuggerModel.createRawLocation(script, entry.lineNumber, entry.columnNumber);
|
| }
|
|
|
| /**
|
| @@ -275,7 +278,7 @@
|
| var sourceMap = script ? this._sourceMapManager.sourceMapForClient(script) : null;
|
| if (!sourceMap)
|
| return true;
|
| - return sourceMap.mappingsForLine(uiSourceCode.url(), lineNumber).length > 0;
|
| + return !!sourceMap.firstSourceLineMapping(uiSourceCode.url(), lineNumber);
|
| }
|
|
|
| dispose() {
|
|
|