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 | 4 |
5 WebInspector.SourceMapNamesResolver = {}; | 5 WebInspector.SourceMapNamesResolver = {}; |
6 | 6 |
7 WebInspector.SourceMapNamesResolver._cachedMapSymbol = Symbol("cache"); | 7 WebInspector.SourceMapNamesResolver._cachedMapSymbol = Symbol("cache"); |
8 WebInspector.SourceMapNamesResolver._cachedIdentifiersSymbol = Symbol("cachedIde
ntifiers"); | 8 WebInspector.SourceMapNamesResolver._cachedIdentifiersSymbol = Symbol("cachedIde
ntifiers"); |
9 | 9 |
10 /** | 10 /** |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 * @return {!Promise<string>} | 256 * @return {!Promise<string>} |
257 */ | 257 */ |
258 WebInspector.SourceMapNamesResolver._resolveExpression = function(callFrame, uiS
ourceCode, lineNumber, startColumnNumber, endColumnNumber) | 258 WebInspector.SourceMapNamesResolver._resolveExpression = function(callFrame, uiS
ourceCode, lineNumber, startColumnNumber, endColumnNumber) |
259 { | 259 { |
260 var target = callFrame.target(); | 260 var target = callFrame.target(); |
261 var rawLocation = WebInspector.debuggerWorkspaceBinding.uiLocationToRawLocat
ion(target, uiSourceCode, lineNumber, startColumnNumber); | 261 var rawLocation = WebInspector.debuggerWorkspaceBinding.uiLocationToRawLocat
ion(target, uiSourceCode, lineNumber, startColumnNumber); |
262 if (!rawLocation) | 262 if (!rawLocation) |
263 return Promise.resolve(""); | 263 return Promise.resolve(""); |
264 | 264 |
265 var script = rawLocation.script(); | 265 var script = rawLocation.script(); |
| 266 if (!script) |
| 267 return Promise.resolve(""); |
266 var sourceMap = WebInspector.debuggerWorkspaceBinding.sourceMapForScript(scr
ipt); | 268 var sourceMap = WebInspector.debuggerWorkspaceBinding.sourceMapForScript(scr
ipt); |
267 if (!sourceMap) | 269 if (!sourceMap) |
268 return Promise.resolve(""); | 270 return Promise.resolve(""); |
269 | 271 |
270 return script.requestContent().then(onContent); | 272 return script.requestContent().then(onContent); |
271 | 273 |
272 /** | 274 /** |
273 * @param {?string} content | 275 * @param {?string} content |
274 * @return {!Promise<string>} | 276 * @return {!Promise<string>} |
275 */ | 277 */ |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 * @return {boolean} | 571 * @return {boolean} |
570 */ | 572 */ |
571 isNode: function() | 573 isNode: function() |
572 { | 574 { |
573 return this._object.isNode(); | 575 return this._object.isNode(); |
574 }, | 576 }, |
575 | 577 |
576 __proto__: WebInspector.RemoteObject.prototype | 578 __proto__: WebInspector.RemoteObject.prototype |
577 } | 579 } |
578 | 580 |
OLD | NEW |