Change the ID fields of PageInformation class to properly refer to pages
Categories
(Core :: Gecko Profiler, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox71 | --- | fixed |
People
(Reporter: canova, Assigned: canova)
References
Details
Attachments
(4 files)
Currently we are keeping mDocShellId
and mDocShellHistoryId
to refer to a PageInformation
. That sort of works for now but it's not gonna work after fission. So we need to change those fields to keep Browsing Context ID and Inner Window ID. That way we won't need to keep a pair to refer from markers and samples too.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
We were keeping nsDocShell::mHistoryId and nsDocShell::mOSHE as keys. They
weren't quite good because:
- While loading an iframe, they were being registered twice with the same
ids(for about:blank and the real URL) sometimes. - It wasn't possible to access to the parent mHistoryId and mOSHE from a child
processes if the parent is in a different process. That may not be the case for
now, but it will be after fission.
So we had to find other IDs to: - Determine the Tab of the frames.
- Determine the URLs of the frames.
For the first use case, we were using nsDocShell::mHistoryId for that purpose
but that was wrong. The closest thing that we can get to a tab ID is
BrowsingContext ID because they don't change after a navigation. But iframes
have different BrowsingContext's, so we still need to create a tree to
construct a tab content. That can be either in the front-end or capture time.
For the second use case, we were using a key pair of mHistoryId and mOSHE. We
now chose to keep inner window IDs for that purpose. Inner window IDs are
unique for each navigation loads because inner window correspond to each JS
window global objects. That's why we can use that without any problem. But one
problem is that we cannot handlehistory.pushState
andhistory.replaceState
changes with that change since window global objects won't change during those.
But that was the best thing we can do after fission. So this will be a small
sacrifice for us to keep that functionality working after fission.
In that patch we also remove the registration/unregistration calls. We are
going to add those calls in the next patch.
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
See the first patch's commit message to learn why we had to change the
PageInformation's IDs to BrowsingContextID and InnerWindowID.
Previously we were registering profiler PageInformation in the nsDocShell
methods. That was not the correct place to handle page loads correctly. That's
why we had to move the registration to WindowGlobalChild::SetDocumentURI and
WindowGlobalChild::ActorDestroy. In those functions we are sure that each
document URIs will come here only once.
Depends on D47065
Assignee | ||
Comment 3•5 years ago
|
||
Depends on D47066
Updated•5 years ago
|
Assignee | ||
Comment 4•5 years ago
|
||
Depends on D47067
Comment 6•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/aa846af7a710
https://hg.mozilla.org/mozilla-central/rev/4d3aa8fd2313
https://hg.mozilla.org/mozilla-central/rev/a82e11140781
https://hg.mozilla.org/mozilla-central/rev/07b6734ecc4e
Description
•