Replace the BrowsingContextId with BrowserId in the profiler
Categories
(Core :: Gecko Profiler, defect, P2)
Tracking
()
People
(Reporter: canova, Assigned: canova)
References
()
Details
(Whiteboard: [not-a-fission-bug])
Attachments
(3 files)
Currently we record all the navigations inside the profiler to see which JS frame/marker belongs to the tab we are profiling. We are recording the innerWindowId
and BrowsingContextId
. innerWindowId serves us well to understand each "frame", but we were using the BrowsingContextId to determine which tab that frame belongs to, like a tab ID. It wasn't exactly a tab ID, but that was the closest ID we can get that resembles the tab ID back then.
But, because it wasn't exactly a tab ID, it started to create us some problems. For example, if you navigate from the preloaded about:newtab
to a web page, BrowserContext is being replaced, and therefore the ID changes. This is happening because BrowsingContext is being replaced on cross-group navigations. That behavior makes it impossible to use it as a "tab ID". Also, it looks like, as a part of fission work, they are going to replace the BrowsingContext for most of the navigations soon. So, we need to stop using BrowsingContextId soon.
As a solution, there is BrowserId
now that we can use inside the BrowserContext. That corresponds directly to Tab Id. We should replace the browsingContextID with this number instead soon.
This will require a version bump and an upgrader in the profiler front-end.
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
This patch is only about renaming the internals of the profiler codebase and
it doesn't touch any parts that requires a backwards compatibility or version
bump.
Assignee | ||
Comment 2•3 years ago
|
||
We have two parts in the codebase that we get the browsingContextId.
- Inside the DOM code with profiler_register_page function whenever a
navigation happens. - Inside the profiler recording front-end when we start the profiler. That was
kept as activeBrowsingContextID, and now it's kept as activeTabID.
We are now changing these parts to keep the browserId instead so it directly
corresponds to the tabs. BrowsingContexts are replaced when there is a
cross-group navigation, but BrowserId is being preserved.
Depends on D109280
Assignee | ||
Comment 3•3 years ago
|
||
Lastly, we are changing the parts that requires a version bump and bumping the
profiler version in the end. This will require a PR in the front-end for a
version upgrader and changes related to the renaming.
Depends on D109281
Updated•3 years ago
|
Assignee | ||
Comment 4•3 years ago
|
||
See the front-end PR of this bug here: https://github.com/firefox-devtools/profiler/pull/3229/
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Pushed by canaltinova@gmail.com: https://hg.mozilla.org/integration/autoland/rev/eb3f01499fba Rename browsingContextID to tabID inside the profiler codebase r=julienw,gerald,devtools-backward-compat-reviewers https://hg.mozilla.org/integration/autoland/rev/0a1c5a2bcfcc Change the tabID sources from browsingContextId to browserId in the profiler r=nika,julienw https://hg.mozilla.org/integration/autoland/rev/6438321cd013 Rename the profiler browsingContextID outputs to tabID and bump the profile version r=gerald
Comment 6•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/eb3f01499fba
https://hg.mozilla.org/mozilla-central/rev/0a1c5a2bcfcc
https://hg.mozilla.org/mozilla-central/rev/6438321cd013
Updated•3 years ago
|
Description
•