Index: third_party/WebKit/Source/devtools/front_end/sources/CallStackSidebarPane.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/CallStackSidebarPane.js b/third_party/WebKit/Source/devtools/front_end/sources/CallStackSidebarPane.js |
index 9c470b37599a48a7ead747fabb3565b71129f24b..b7ef31fc4b84edc1bdf19760353a0fb53042256a 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/sources/CallStackSidebarPane.js |
+++ b/third_party/WebKit/Source/devtools/front_end/sources/CallStackSidebarPane.js |
@@ -81,8 +81,20 @@ WebInspector.CallStackSidebarPane.prototype = { |
this._appendSidebarCallFrames(this._callFramesFromDebugger(details.callFrames)); |
var topStackHidden = (this._hiddenCallFrames === this.callFrames.length); |
+ const asyncFunctionDesription = "async function"; |
while (asyncStackTrace) { |
- var title = WebInspector.asyncStackTraceLabel(asyncStackTrace.description); |
+ var title = ""; |
+ if (asyncStackTrace.description === asyncFunctionDesription) { |
+ var redundantFrame = asyncStackTrace.callFrames.shift(); |
+ var topFrame = asyncStackTrace.callFrames[0]; |
+ if (topFrame && redundantFrame) { |
+ var redundantFrameName = WebInspector.beautifyFunctionName(redundantFrame.functionName); |
+ var topFrameName = WebInspector.beautifyFunctionName(topFrame.functionName); |
+ title = WebInspector.UIString("%s awaits %s", topFrameName, redundantFrameName); |
dgozman
2016/10/20 01:19:01
No UIString.
kozy
2016/10/20 01:39:33
Done.
|
+ } |
+ } else { |
+ title = WebInspector.asyncStackTraceLabel(asyncStackTrace.description); |
+ } |
var asyncCallFrame = new WebInspector.UIList.Item(title, "", true); |
asyncCallFrame.setHoverable(false); |
asyncCallFrame.element.addEventListener("contextmenu", this._asyncCallFrameContextMenu.bind(this, this.callFrames.length), true); |