Skip to content

Commit 3606a94

Browse files
ElormCochDevtools-frontend LUCI CQ
authored andcommitted
Resolve function names for async stack frames via sourcemaps scopes if possible.
Similar to the call to `createForDebuggerCallFrame`, `createItemsForAsyncStack` could leverage `SourceMapScopes.NamesResolver` to resolve functionNames via sourcemaps scopes if available Bug: None Change-Id: I37ff01367d1a1835aa4305555c297bf641bb3d7c Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6419398 Commit-Queue: Sylvester Elorm Coch <[email protected]> Reviewed-by: Simon Zünd <[email protected]>
1 parent 9876f54 commit 3606a94

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

front_end/panels/sources/CallStackSidebarPane.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,13 @@ export class Item {
607607
liveLocationPromises.push(
608608
Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().createCallFrameLiveLocation(
609609
rawLocation, item.update.bind(item), locationPool));
610+
void SourceMapScopes.NamesResolver.resolveProfileFrameFunctionName(frame, debuggerModel.target())
611+
.then(functionName => {
612+
if (functionName && functionName !== frame.functionName) {
613+
item.title = functionName;
614+
item.updateDelegate(item);
615+
}
616+
});
610617
asyncFrameItems.push(item);
611618
}
612619

0 commit comments

Comments
 (0)