+7
−2
Loading
This patch changes how BrowsingContextGroups track CrossOriginIsolated status such that it should be more consistently tracked and easier to assert in the places which depend on it. In the new state of the world, a flag is stored within the BCG's ID which tracks whether it was created for cross-origin isolated documents, and that is also checked when making decisions about how to isolate initial about:blank documents, and whether to allow certain changes to CrossOriginOpenerPolicy. This flag is stashed within the ID, as it needs to be preserved if the BCG is destroyed and then re-created from the ID (which may be e.g. round-tripped through JS code). I also considered making the ID be a string instead, to make it easier to include extra information like this, and more clear where the information is stored, however :kmag generally preferred using a bit within the integer ID. These new assertions should now be less likely to spuriously fail due to a DocShell disappearing or similar as well, which should help fix the original issue. Differential Revision: https://phabricator.services.mozilla.com/D152695