firefox-devtools / firefox-devtools/profiler

Opening source view using context menu does not always seek to the right line

Open
#4,434 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.5k
Forks
491
Avg merge
3d 5h
Merged PRs (30d)
30

Description

From [PR#4423](https://github.com/firefox-devtools/profiler/pull/4423):
> mstange wrote:
> When using the context menu to open the source view, the right clicked call node can be different from the selected call node. This is a problem because the selected call node influences the behavior of the source view in that it determines which line is scrolled into view. You can see this in [this profile in the deploy preview](https://deploy-preview-4423--perf-html.netlify.app/public/t1xfb8zn0181gg2zyjeyk7j7tkdhgwhjnvxfn18/calltree/?globalTrackOrder=0w7&hiddenGlobalTracks=1w7&hiddenLocalTracksByPid=354293-0wu~354382-0~354527-0~354609-0~354426-0~354405-0~354531-0&profileName=Firefox%20110%E2%80%93%20Linux&range=3353m145&thread=0&transforms=f-combined-0wacB2B3ghz9jC2C5&v=8) as follows:
>
> 1. Select the call node with the function "js::gc::GCRuntime::gcSlice".
>
> 2. Right click the call node with the function "js::gc::GCRuntime::markUntilBudgetExhausted" (6 frames deeper than the selected call node). Both these functions are located in GC.cpp.
>
> 3. Click "Show GC.cpp".
>
>
> Now the source view will show GC.cpp, but it will be scrolled to display the contents of the "js::gc::GCRuntime::gcSlice" function. Ideally, it would be scrolled to display the contents of the "markUntilBudgetExhausted" function.

┆Issue is synchronized with this [Jira Task](https://mozilla-hub.atlassian.net/browse/FP-604)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.