Description
SourceMapsCombinator.convert wraps source map loading in a try/finally block and returns the accumulated result from finally.
A return statement inside finally overrides exceptions thrown while reading or parsing a source map. As a result, missing files, permission failures, and malformed source maps are silently treated as if no source map were available.
Expected behavior
Errors raised while reading or parsing a source map should propagate to the caller so that the conversion failure can be diagnosed and handled appropriately.
Actual behavior
The exception is suppressed and conversion either continues or returns the original bundle source map. This can result in incorrect breakpoint or stack-frame mapping without exposing the underlying cause.
Proposed fix
Remove the try/finally wrapper and return normally after loading the source map consumer:
const consumer = this.getSourceMapConsumerFrom(file);
if (consumer) {
result[file] = consumer;
}
return result;
Description
SourceMapsCombinator.convertwraps source map loading in atry/finallyblock and returns the accumulated result fromfinally.A
returnstatement insidefinallyoverrides exceptions thrown while reading or parsing a source map. As a result, missing files, permission failures, and malformed source maps are silently treated as if no source map were available.Expected behavior
Errors raised while reading or parsing a source map should propagate to the caller so that the conversion failure can be diagnosed and handled appropriately.
Actual behavior
The exception is suppressed and conversion either continues or returns the original bundle source map. This can result in incorrect breakpoint or stack-frame mapping without exposing the underlying cause.
Proposed fix
Remove the
try/finallywrapper and return normally after loading the source map consumer: