Currently when we set up an OOP iframe, we don't correctly set up the TabContext which is used to create the
BrowserParent actor. Instead, we make up some values which usually work out: https://searchfox.org/mozilla-central/rev/040aa667f419932adf425d92c7438f03230ad96b/dom/ipc/BrowserBridgeParent.cpp#41-48
This bit not being set correctly can cause content crashes when things like
postMessage are sent between two out-of-process frames which are same-origin to one another, due to them being confused about the state of the private browsing bit.
We should be correctly setting these values. There are 5 arguments to
SetTabContext which need to be inherited or set:
aIsMozBrowserElement: We don't intend to support this with Fission currently, so we can probably leave this as
aChromeOuterWindowId: We can inherit this from our
aShowFocusRings: It looks like this comes from the root window, so let's inherit it too.
aOriginAttributes: The attributes we set on this don't change for subframes, so let's inherit this.
aPresentationURL: This is already passed in as an argument, so let's keep using that value.
This should ideally set up the origin attributes used in the content process more accurately.