| 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 function resolveSourceName(id) { | 145 function resolveSourceName(id) { |
| 146 var startEntry = sourceMap.findEntry(id.lineNumber, id.columnNumber); | 146 var startEntry = sourceMap.findEntry(id.lineNumber, id.columnNumber); |
| 147 var endEntry = sourceMap.findEntry(id.lineNumber, id.columnNumber + id.name.
length); | 147 var endEntry = sourceMap.findEntry(id.lineNumber, id.columnNumber + id.name.
length); |
| 148 if (!startEntry || !endEntry || !startEntry.sourceURL || startEntry.sourceUR
L !== endEntry.sourceURL || | 148 if (!startEntry || !endEntry || !startEntry.sourceURL || startEntry.sourceUR
L !== endEntry.sourceURL || |
| 149 !startEntry.sourceLineNumber || !startEntry.sourceColumnNumber || !endEn
try.sourceLineNumber || | 149 !startEntry.sourceLineNumber || !startEntry.sourceColumnNumber || !endEn
try.sourceLineNumber || |
| 150 !endEntry.sourceColumnNumber) | 150 !endEntry.sourceColumnNumber) |
| 151 return Promise.resolve(/** @type {?string} */ (null)); | 151 return Promise.resolve(/** @type {?string} */ (null)); |
| 152 var sourceTextRange = new Common.TextRange( | 152 var sourceTextRange = new Common.TextRange( |
| 153 startEntry.sourceLineNumber, startEntry.sourceColumnNumber, endEntry.sou
rceLineNumber, | 153 startEntry.sourceLineNumber, startEntry.sourceColumnNumber, endEntry.sou
rceLineNumber, |
| 154 endEntry.sourceColumnNumber); | 154 endEntry.sourceColumnNumber); |
| 155 var uiSourceCode = Bindings.networkMapping.uiSourceCodeForScriptURL(startEnt
ry.sourceURL, script); | 155 var uiSourceCode = Bindings.NetworkProject.uiSourceCodeForScriptURL(Workspac
e.workspace, startEntry.sourceURL, script); |
| 156 if (!uiSourceCode) | 156 if (!uiSourceCode) |
| 157 return Promise.resolve(/** @type {?string} */ (null)); | 157 return Promise.resolve(/** @type {?string} */ (null)); |
| 158 | 158 |
| 159 return uiSourceCode.requestContent().then(onSourceContent.bind(null, sourceT
extRange)); | 159 return uiSourceCode.requestContent().then(onSourceContent.bind(null, sourceT
extRange)); |
| 160 } | 160 } |
| 161 | 161 |
| 162 /** | 162 /** |
| 163 * @param {!Common.TextRange} sourceTextRange | 163 * @param {!Common.TextRange} sourceTextRange |
| 164 * @param {?string} content | 164 * @param {?string} content |
| 165 * @return {?string} | 165 * @return {?string} |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 } | 543 } |
| 544 | 544 |
| 545 /** | 545 /** |
| 546 * @override | 546 * @override |
| 547 * @return {boolean} | 547 * @return {boolean} |
| 548 */ | 548 */ |
| 549 isNode() { | 549 isNode() { |
| 550 return this._object.isNode(); | 550 return this._object.isNode(); |
| 551 } | 551 } |
| 552 }; | 552 }; |
| OLD | NEW |