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 <bencoe@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 3c6545f commit 9ecae58

1 file changed

Lines changed: 0 additions & 14 deletions

File tree

‎lib/internal/source_map/source_map.js‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ class StringCharIterator {
121121
*/
122122
classSourceMap{
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(leti=0;i<this.#mappings.length;++i){
267-
constmapping=this.#mappings[i];
268-
consturl=mapping[2];
269-
if(!url)
270-
continue;
271-
if(!this.#reverseMappingsBySourceURL[url])
272-
this.#reverseMappingsBySourceURL[url]=[];
273-
constreverseMappings=this.#reverseMappingsBySourceURL[url];
274-
constsourceLine=mapping[3];
275-
if(!reverseMappings[sourceLine])
276-
reverseMappings[sourceLine]=[mapping[0],mapping[1]];
277-
}
278264
};
279265
}
280266

0 commit comments

Comments
 (0)