Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/internal/source_map/source_map_cache_map.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ const {
source_map_data_private_symbol,
},
} = internalBinding('util');
let debug = require('internal/util/debuglog').debuglog('source_map', (fn) => {
debug = fn;
});

/**
* Specialized map of WeakRefs to module instances that caches source map
Expand Down Expand Up @@ -46,6 +49,7 @@ class SourceMapCacheMap {
ArrayPrototypeForEach(keys, (key) => {
const ref = this.#weakModuleMap.get(key);
if (ref && ref.deref() === undefined) {
debug(`Cleanup obsolete source map cache entry with key: ${key}`);
this.#weakModuleMap.delete(key);
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,5 @@ Error.stackTraceLimit = 2;
try {
require('../typescript-sourcemapping_url_string');
} catch (err) {
setTimeout(() => {
console.info(err);
}, 10);
console.info(err);
}
4 changes: 1 addition & 3 deletions test/fixtures/source-map/output/source_map_throw_catch.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,5 @@ Error.stackTraceLimit = 2;
try {
require('../typescript-throw');
} catch (err) {
setTimeout(() => {
console.info(err);
}, 10);
console.info(err);
}
Loading