Chromium Code Reviews| 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..c46310faf3e2e4834f6ec308bf0db3fdd7af9f15 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/sources/CallStackSidebarPane.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/sources/CallStackSidebarPane.js |
| @@ -81,12 +81,23 @@ WebInspector.CallStackSidebarPane.prototype = { |
| this._appendSidebarCallFrames(this._callFramesFromDebugger(details.callFrames)); |
| var topStackHidden = (this._hiddenCallFrames === this.callFrames.length); |
| + var peviousStackTrace = details.callFrames; |
| while (asyncStackTrace) { |
| - var title = WebInspector.asyncStackTraceLabel(asyncStackTrace.description); |
| + var title = ""; |
| + if (asyncStackTrace.description === "async function") { |
| + var redundantFrame = peviousStackTrace[peviousStackTrace.length - 1]; |
|
dgozman
2016/10/21 19:03:35
It's not redundant anymore.
kozy
2016/10/21 19:30:59
Done.
|
| + var topFrame = asyncStackTrace.callFrames[0]; |
| + var redundantFrameName = WebInspector.beautifyFunctionName(redundantFrame.functionName); |
| + var topFrameName = WebInspector.beautifyFunctionName(topFrame.functionName); |
| + title = topFrameName + " awaits " + redundantFrameName; |
| + } 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); |
| this._appendSidebarCallFrames(this._callFramesFromRuntime(asyncStackTrace.callFrames, asyncCallFrame), asyncCallFrame); |
| + peviousStackTrace = asyncStackTrace.callFrames; |
| asyncStackTrace = asyncStackTrace.parent; |
| } |