diff options
Diffstat (limited to 'core/01_core.js')
-rw-r--r-- | core/01_core.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/01_core.js b/core/01_core.js index 5df11c382..02150674e 100644 --- a/core/01_core.js +++ b/core/01_core.js @@ -187,8 +187,8 @@ // Rethrow the error throw err; } - handleOpCallTracing("${name}", id, promise); - promise[promiseIdSymbol] = id; + promise = handleOpCallTracing("${name}", id, promise); + promise[promiseIdSymbol] = id; return promise; } `, @@ -218,10 +218,12 @@ if (opCallTracingEnabled) { const stack = StringPrototypeSlice(new Error().stack, 6); MapPrototypeSet(opCallTraces, promiseId, { opName, stack }); - p = PromisePrototypeFinally( + return PromisePrototypeFinally( p, () => MapPrototypeDelete(opCallTraces, promiseId), ); + } else { + return p; } } |