From 2f6e3daa19b2216ea84551b09d06818a0458617f Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Wed, 21 Jul 2021 03:16:43 -0400 Subject: [PATCH] Add rendering for async stack frames --- source-map-support.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source-map-support.js b/source-map-support.js index ff978a7..add25c7 100644 --- a/source-map-support.js +++ b/source-map-support.js @@ -299,6 +299,17 @@ function CallSiteToString() { } var line = ""; + var isAsync = this.isAsync ? this.isAsync() : false; + if(isAsync) { + line += 'async '; + var isPromiseAll = this.isPromiseAll ? this.isPromiseAll() : false; + var isPromiseAny = this.isPromiseAny ? this.isPromiseAny() : false; + if(isPromiseAny || isPromiseAll) { + line += isPromiseAll ? 'Promise.all (index ' : 'Promise.any (index '; + var promiseIndex = this.getPromiseIndex(); + line += promiseIndex + ')'; + } + } var functionName = this.getFunctionName(); var addSuffix = true; var isConstructor = this.isConstructor();