Skip to content

Commit 6bd1451

Browse files
authored
core(trace-engine-result): exclude failed source maps (#16412)
1 parent 0e8d2dd commit 6bd1451

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

build/build-cdt-lib.js

+6
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ const modifications = [
5858
// eslint-disable-next-line max-len
5959
'Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.USE_SOURCE_MAP_SCOPES)': 'false',
6060
'Common.Base64.BASE64_CODES': 'BASE64_CODES',
61+
'* Implements Source Map V3 model.': [
62+
'* @param {string} compiledURL',
63+
'* @param {string} sourceMappingURL',
64+
'* @param {object} payload',
65+
'* Implements Source Map V3 model.',
66+
].join('\n '),
6167
},
6268
classesToRemove: [],
6369
methodsToRemove: [

core/computed/trace-engine-result.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class TraceEngineResult {
5151
lanternSettings,
5252
async resolveSourceMap(params) {
5353
const sourceMap = SourceMaps.find(sm => sm.scriptId === params.scriptId);
54-
if (!sourceMap) {
54+
if (!sourceMap || !sourceMap.map) {
5555
return null;
5656
}
5757

core/lib/cdt/generated/SourceMap.js

+3
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ class SourceMap {
104104
#sourceInfoByURL = new Map();
105105
#scopesInfo = null;
106106
/**
107+
* @param {string} compiledURL
108+
* @param {string} sourceMappingURL
109+
* @param {object} payload
107110
* Implements Source Map V3 model. See https://github.com/google/closure-compiler/wiki/Source-Maps
108111
* for format description.
109112
*/

0 commit comments

Comments
 (0)