mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-02 14:30:43 +00:00

This patch enables sandboxed srcdoc loads to take place via DocumentChannel, and adds mechanisms for enabling unsandboxed ones. Both unsandboxed srcdoc, and in subsequent patches, about:blank, loads require that the triggering principal and the principal to inherit point to the same instance if the load takes place in the same process as where we are inheriting those principals from. We save those principals on a target browsing context before we load the URI, and later, when we are deserializing LoadInfoArgs into LoadInfo in the content process, we retrieve the saved principals if the current load identifier of the target BC matches the load identifier saved along with the principals. We also need to make sure that during a process switch for about:srcdoc load, we don't use the original URI for about:srcdoc to determine the remote type and instead we use channel's result principal. Differential Revision: https://phabricator.services.mozilla.com/D85079