Files
Nika Layzell 8f39535371 Bug 2022249 - Part 1: Track the parent process channel as passed to WindowGlobalParent, r=smaug,ipc-reviewers,necko-reviewers,valentin,mccr8
This is done by creating a nsID when the object is passed into the content
process. An object containing the nsIChannel instance, as well as information
about where we expect it to be loaded, is kept on the ContentParent actor.

When the actual document is created, this nsID is sent up (wrapped in the
ParentProcessChannelHandle type), and re-matched with the entry in
ContentParent. This allows the actual state to be linked from the
DocumentLoadListener to the final WindowGlobalParent instance.

For now, only the channel is passed up as metadata, with some context as to
where the load is expected to complete being carried along as validation. It
would be good to also validate other information (such as the principal & final
document URI) against this channel object, but that is being left for another
bug.

In the future, we should also likely validate cases where no channel is
provided to ensure it is one of the known cases where a channel is not
available (i.e. initial about:blank, srcdoc, or javascript: URI).

Differential Revision: https://phabricator.services.mozilla.com/D286926
2026-06-11 15:46:18 +00:00
..