Skip to content

Commit 9ecae58

Browse files
jridgewellcodebytere
authored andcommitted
lib: delete dead code in SourceMap
This seems to be a leftover from the chromium project. Nothing uses `#reverseMappingsBySourceURL`, so constructing it isn't necessary. PR-URL: #31512 Reviewed-By: Ben Coe <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 3c6545f commit 9ecae58

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

lib/internal/source_map/source_map.js

-14
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ class StringCharIterator {
121121
*/
122122
class SourceMap {
123123
#payload;
124-
#reverseMappingsBySourceURL = [];
125124
#mappings = [];
126125
#sources = {};
127126
#sourceContentByURL = {};
@@ -262,19 +261,6 @@ class SourceMap {
262261
this.#mappings.push([lineNumber, columnNumber, sourceURL,
263262
sourceLineNumber, sourceColumnNumber]);
264263
}
265-
266-
for (let i = 0; i < this.#mappings.length; ++i) {
267-
const mapping = this.#mappings[i];
268-
const url = mapping[2];
269-
if (!url)
270-
continue;
271-
if (!this.#reverseMappingsBySourceURL[url])
272-
this.#reverseMappingsBySourceURL[url] = [];
273-
const reverseMappings = this.#reverseMappingsBySourceURL[url];
274-
const sourceLine = mapping[3];
275-
if (!reverseMappings[sourceLine])
276-
reverseMappings[sourceLine] = [mapping[0], mapping[1]];
277-
}
278264
};
279265
}
280266

0 commit comments

Comments
 (0)