diff --git a/build/build-cdt-lib.js b/build/build-cdt-lib.js index 8feb73f6cce2..b11bf53c0656 100644 --- a/build/build-cdt-lib.js +++ b/build/build-cdt-lib.js @@ -23,7 +23,7 @@ for (const [input, output] of Object.entries(files)) { lines = lines.splice(0, cutoffIndex); let deletionMode = false; - let deletionCounter = 0; + let deletionBraceCount = 0; const modifiedLines = lines.map((line, i) => { // Don't modify jsdoc comments. @@ -35,7 +35,7 @@ for (const [input, output] of Object.entries(files)) { if (input.endsWith('SourceMap.js')) { if (line.includes('static load(')) deletionMode = true; if (line.includes('sourceContentProvider(')) deletionMode = true; - // if (line.includes('Common.UIString')) newLine = ''; + if (line.includes('Common.UIString')) newLine = ''; if (line.includes('export class WasmSourceMap')) deletionMode = true; if (line.includes('WasmSourceMap')) newLine = ''; if (line.includes('export class EditResult')) deletionMode = true; @@ -43,15 +43,14 @@ for (const [input, output] of Object.entries(files)) { } if (deletionMode) { - if (line.trim().endsWith('{')) deletionCounter += 1; - if (line.trim().startsWith('}')) deletionCounter -= 1; - if (deletionCounter >= 0) { + if (line.trim().endsWith('{')) deletionBraceCount += 1; + if (line.trim().startsWith('}')) deletionBraceCount -= 1; + if (deletionBraceCount >= 0) { newLine = ''; - // newLine = newLine.trim() + ` /* hi ${deletionCounter} */\n`; } - if (deletionCounter === 0) { + if (deletionBraceCount === 0) { deletionMode = false; - deletionCounter = 0; + deletionBraceCount = 0; } } diff --git a/lighthouse-core/lib/cdt/generated/SourceMap.js b/lighthouse-core/lib/cdt/generated/SourceMap.js index 988c77935614..585fb192b45f 100644 --- a/lighthouse-core/lib/cdt/generated/SourceMap.js +++ b/lighthouse-core/lib/cdt/generated/SourceMap.js @@ -420,7 +420,6 @@ const TextSourceMap = module.exports.TextSourceMap = class TextSourceMap { let url = '' || href; const source = sourceMap.sourcesContent && sourceMap.sourcesContent[i]; if (url === this._compiledURL && source) { - url += Common.UIString('? [sm]'); } this._sourceInfos.set(url, new TextSourceMap.SourceInfo(source, null)); sourcesList.push(url);