| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 Sources.SourceMapNamesResolver = {}; | 4 Sources.SourceMapNamesResolver = {}; |
| 5 | 5 |
| 6 Sources.SourceMapNamesResolver._cachedMapSymbol = Symbol('cache'); | 6 Sources.SourceMapNamesResolver._cachedMapSymbol = Symbol('cache'); |
| 7 Sources.SourceMapNamesResolver._cachedIdentifiersSymbol = Symbol('cachedIdentifi
ers'); | 7 Sources.SourceMapNamesResolver._cachedIdentifiersSymbol = Symbol('cachedIdentifi
ers'); |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * @unrestricted | 10 * @unrestricted |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 | 244 |
| 245 /** | 245 /** |
| 246 * @param {!Workspace.UISourceCode} uiSourceCode | 246 * @param {!Workspace.UISourceCode} uiSourceCode |
| 247 * @param {number} lineNumber | 247 * @param {number} lineNumber |
| 248 * @param {number} startColumnNumber | 248 * @param {number} startColumnNumber |
| 249 * @param {number} endColumnNumber | 249 * @param {number} endColumnNumber |
| 250 * @return {!Promise<string>} | 250 * @return {!Promise<string>} |
| 251 */ | 251 */ |
| 252 Sources.SourceMapNamesResolver._resolveExpression = function( | 252 Sources.SourceMapNamesResolver._resolveExpression = function( |
| 253 uiSourceCode, lineNumber, startColumnNumber, endColumnNumber) { | 253 uiSourceCode, lineNumber, startColumnNumber, endColumnNumber) { |
| 254 var rawLocation = | 254 var rawLocations = |
| 255 Bindings.debuggerWorkspaceBinding.uiLocationToRawLocation(uiSourceCode, li
neNumber, startColumnNumber); | 255 Bindings.debuggerWorkspaceBinding.uiLocationToRawLocations(uiSourceCode, l
ineNumber, startColumnNumber); |
| 256 if (!rawLocation) | 256 if (!rawLocations.length) |
| 257 return Promise.resolve(''); | 257 return Promise.resolve(''); |
| 258 | 258 |
| 259 var script = rawLocation.script(); | 259 var script = rawLocations[0].script(); |
| 260 if (!script) | 260 if (!script) |
| 261 return Promise.resolve(''); | 261 return Promise.resolve(''); |
| 262 var sourceMap = Bindings.debuggerWorkspaceBinding.sourceMapForScript(script); | 262 var sourceMap = Bindings.debuggerWorkspaceBinding.sourceMapForScript(script); |
| 263 if (!sourceMap) | 263 if (!sourceMap) |
| 264 return Promise.resolve(''); | 264 return Promise.resolve(''); |
| 265 | 265 |
| 266 return script.requestContent().then(onContent); | 266 return script.requestContent().then(onContent); |
| 267 | 267 |
| 268 /** | 268 /** |
| 269 * @param {?string} content | 269 * @param {?string} content |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 } | 565 } |
| 566 | 566 |
| 567 /** | 567 /** |
| 568 * @override | 568 * @override |
| 569 * @return {boolean} | 569 * @return {boolean} |
| 570 */ | 570 */ |
| 571 isNode() { | 571 isNode() { |
| 572 return this._object.isNode(); | 572 return this._object.isNode(); |
| 573 } | 573 } |
| 574 }; | 574 }; |
| OLD | NEW |