| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent c1c6641 commit adce20c
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -13,6 +13,9 @@ const { | |||
| 13 | 13 | source_map_data_private_symbol, | |
| 14 | 14 | }, | |
| 15 | 15 | } = internalBinding('util'); | |
| 16 | + let debug = require('internal/util/debuglog').debuglog('source_map', (fn) => { | ||
| 17 | + debug = fn; | ||
| 18 | + }); | ||
| 16 | 19 | ||
| 17 | 20 | /** | |
| 18 | 21 | * Specialized map of WeakRefs to module instances that caches source map | |
@@ -46,6 +49,7 @@ class SourceMapCacheMap { | |||
| 46 | 49 | ArrayPrototypeForEach(keys, (key) => { | |
| 47 | 50 | const ref = this.#weakModuleMap.get(key); | |
| 48 | 51 | if (ref && ref.deref() === undefined) { | |
| 52 | + debug(`Cleanup obsolete source map cache entry with key: ${key}`); | ||
| 49 | 53 | this.#weakModuleMap.delete(key); | |
| 50 | 54 | } | |
| 51 | 55 | }); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,7 +7,5 @@ Error.stackTraceLimit = 2; | |||
| 7 | 7 | try { | |
| 8 | 8 | require('../typescript-sourcemapping_url_string'); | |
| 9 | 9 | } catch (err) { | |
| 10 | - setTimeout(() => { | ||
| 11 | - console.info(err); | ||
| 12 | - }, 10); | ||
| 10 | + console.info(err); | ||
| 13 | 11 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,7 +7,5 @@ Error.stackTraceLimit = 2; | |||
| 7 | 7 | try { | |
| 8 | 8 | require('../typescript-throw'); | |
| 9 | 9 | } catch (err) { | |
| 10 | - setTimeout(() => { | ||
| 11 | - console.info(err); | ||
| 12 | - }, 10); | ||
| 10 | + console.info(err); | ||
| 13 | 11 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments