Early Hints: Verify in Parent that channel connecting from content process is the same as the channel in EarlyHintPreloader
Categories
(Core :: Networking: HTTP, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox115 | --- | fixed |
People
(Reporter: manuel, Assigned: manuel)
References
(Blocks 1 open bug)
Details
(Whiteboard: [necko-triaged])
Attachments
(1 file, 3 obsolete files)
Assignee | ||
Comment 1•2 years ago
|
||
One way of doing this would be to store the EarlyHintRegistrar in the ContentParent instead of a global one. Maybe we can remove the need of the EarlyHintRegistrar by storing the EarlyHintsService in ContentProcess.
That would have the benefits that we could clear up the EarlyHint preloads when the tab gets closed no matter where in the process we are in (reducing the need for the ParentConnectTimout timer).
Assignee | ||
Comment 2•2 years ago
|
||
Roughly the plan:
- Have a structure like
OngoingEarlyHints
that gets stored inContentParent
, right before or within the DocumentLoadListener::RedirectToRealChannel. Essentially moving the ownership of OngoingEarlyHints fromDocumentLoadListener
toContentParent
. This allows us to cancel all Early Hints when the tab gets closed (and theContentParent
destructed). I either reuse theOngoingEarlyHint
class or create a new one that can't add further preloads. - The
earlyHintPreloadId
will be the index in the array ofOngoingEarlyHints
holding theEarlyHintPreloader
s. - When the
HttpChannelParent
connects back, theEarlyHintPreloader
gets removed from the array, moving the ownership to the newHttpChannelParent
. (similar to how theEarlyHintPreloader
gets removed from theEarlyHintRegistrar
now.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 3•2 years ago
•
|
||
A problem I currently have implementing checks is, that when Registering the EarlyHintPreloader
s
mEarlyHintsService.RegisterLinksAndGetConnectArgs(ehArgs);
the ContentParent
isn't available for loads initiated in the parent:
Therefore I can neither store the EarlyHintRegistrar
in the ContentParent
nor pass the processId of the ContentParent
to the EarlyHintPreloaders
for later verfication.
Also the mParentChannelListener->GetBrowsingContext()->OwnerProcessId() == 0
in DocumentLoadListener
during that stage.
Assignee | ||
Comment 4•2 years ago
|
||
To verify in Parent that channel connecting from content process is the same as the channel in EarlyHintPreloader
Assignee | ||
Comment 5•2 years ago
|
||
This commit is planned to be squashed with the previous one.
Depends on D171557
Assignee | ||
Comment 6•2 years ago
|
||
To verify in Parent that channel connecting from content process is the same as the channel in EarlyHintPreloader
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Comment 7•2 years ago
|
||
Updated•2 years ago
|
Comment 9•2 years ago
|
||
bugherder |
Description
•