Commit d1b009b
lib: suppress source map lookup exceptions
When the source map data are invalid json strings, skip construct
`SourceMap` on it. Additionally, suppress exceptions on source map
lookups and fix test runners crash on invalid source maps.
PR-URL: #56299
Refs: #56296
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>1 parent 7819bfe commit d1b009bCopy full SHA for d1b009b
File tree
Expand file treeCollapse file tree
2 files changed
+41
-10
lines changedOpen diff view settings
Filter options
- lib/internal/source_map
- test/parallel
Expand file treeCollapse file tree
2 files changed
+41
-10
lines changedOpen diff view settings
Collapse file
lib/internal/source_map/source_map_cache.js
Copy file name to clipboardExpand all lines: lib/internal/source_map/source_map_cache.js+29-10Lines changed: 29 additions & 10 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
155 | 155 | |
156 | 156 | |
157 | 157 | |
| 158 | + |
| 159 | + |
| 160 | + |
158 | 161 | |
159 | 162 | |
160 | 163 | |
| ||
277 | 280 | |
278 | 281 | |
279 | 282 | |
| 283 | + |
| 284 | + |
280 | 285 | |
281 | 286 | |
282 | 287 | |
| ||
331 | 336 | |
332 | 337 | |
333 | 338 | |
| 339 | + |
| 340 | + |
| 341 | + |
334 | 342 | |
335 | 343 | |
336 | 344 | |
337 | 345 | |
338 | | - |
339 | | - |
| 346 | + |
| 347 | + |
340 | 348 | |
| 349 | + |
341 | 350 | |
342 | | - |
343 | | - |
| 351 | + |
| 352 | + |
| 353 | + |
| 354 | + |
| 355 | + |
| 356 | + |
| 357 | + |
| 358 | + |
| 359 | + |
| 360 | + |
| 361 | + |
| 362 | + |
| 363 | + |
| 364 | + |
| 365 | + |
| 366 | + |
| 367 | + |
| 368 | + |
344 | 369 | |
345 | 370 | |
346 | | - |
347 | | - |
348 | | - |
349 | | - |
350 | | - |
351 | | - |
352 | 371 | |
353 | 372 | |
354 | 373 | |
|
Collapse file
test/parallel/test-runner-source-maps-invalid-json.js
Copy file name to clipboardExpand all lines: test/parallel/test-runner-source-maps-invalid-json.js+12Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments