mirror of
https://github.com/mozilla-firefox/firefox.git
synced 2026-06-14 02:14:57 -05:00
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