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
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
This patch makes the triggering princpal to be propagated to the
BrowserChild when calling LoadURL in nsFrameLoader. And use it as the
triggering principal for loading instead of the system principal.
Differential Revision: https://phabricator.services.mozilla.com/D75965
Right now we do the same thing in two pretty different code paths... That's not
great, so unify them.
Differential Revision: https://phabricator.services.mozilla.com/D59629
--HG--
extra : moz-landing-system : lando
Right now we do the same thing in two pretty different code paths... That's not
great, so unify them.
Differential Revision: https://phabricator.services.mozilla.com/D59629
--HG--
extra : moz-landing-system : lando
This lets us get the TabId for the PBrowser created via PBrowserBridge in the embedding process.
Differential Revision: https://phabricator.services.mozilla.com/D33565
--HG--
extra : rebase_source : 32f4b465426e4d19e4a81df0fc67076b0132038b
extra : source : 5e938107e10ed489477d104c70e413e0c4e6091d
extra : histedit_source : 24bda5ef39697eb4ba9e691d4a3afcc5f144737b
This commit adds RemoteBrowser::UpdateEffects for updating a remote browser's
EffectsInfo over IPC.
A following commit will actually use the EffectsInfo for
enabling/disabling rendering for a remote browser, and another
commit will actually use these IPDL methods.
Differential Revision: https://phabricator.services.mozilla.com/D31472
--HG--
extra : rebase_source : 304d843d2c4a35f468aa847ee66005a932bb7eb2
extra : intermediate-source : d31b7d33efc711fb8115663f4cfc5bc98fd58d73
extra : source : 5aea122dea2120efe107c639b17678e0464b1389
It's possible for front-end references to nsIRemoteTab to outlive the IPDL actor. When
this happens, we should ignore methods and property accesses.
The one special case is that some code expects to be able to
access the TabId after the browser has been destroyed. For this
we can just cache the ID.
Differential Revision: https://phabricator.services.mozilla.com/D31449
--HG--
extra : source : 9b79caa460a01a7bdf9c27ede487de0ec642ae0b
extra : histedit_source : ec32bc78fac57f523b4c1b2aef08fddfccfbe546%2C8770eefa09a764733a09d8256ef9b3e2f04244df
BrowserParent is cycle collected and supported weak references, so this commit adds support
for these things to BrowserHost.
Differential Revision: https://phabricator.services.mozilla.com/D31448
--HG--
extra : source : e65cb2d4c5a55e3049922df02af643337b7a58b2
This commit finally updates some nsIRemoteTab methods to apply
to the whole tree of BrowserParent's.
Differential Revision: https://phabricator.services.mozilla.com/D31447
--HG--
extra : source : 99f971a02d87941ee49a391de0e0626c170c0821
This commit moves the actual implementation of nsIRemoteTab from BrowserParent
to BrowserHost, without any functional changes.
Differential Revision: https://phabricator.services.mozilla.com/D31445
--HG--
extra : source : d25963c72ff7981990660050182a82ea3e935f53
This commit removes nsIRemoteTab as a parent class from BrowserParent,
so that BrowserHost is the only concrete implementation of nsIRemoteTab.
Some static_cast's are updated to cast to BrowserHost, and other places
have to be updated to pass a BrowserHost instead of a BrowserParent.
WindowGlobalParent had a getter to return it's managing BrowserParent
as a nsIRemoteTab. I couldn't find a use of this in-tree, so I've just
opt-ed to remove it. If there's a use-case, we can add something back
in.
Differential Revision: https://phabricator.services.mozilla.com/D31444
--HG--
extra : source : 810b7371987139844429d0206f9da6a7701a1efc
This commit implements nsIRemoteTab in BrowserHost by delegating to nsIRemoteTab. In a
future commit, these methods will be implemented by BrowserHost.
Differential Revision: https://phabricator.services.mozilla.com/D31443
--HG--
extra : source : ee10a825448133635dbd933c3d60fe427400647b
RemoteBrowser is a common interface between the chrome/content process cases for nsFrameLoader,
that allows us to abstract IPC details away. BrowserHost is a concrete implementation for
the chrome process, while BrowserBridgeHost implements the content process case.
Differential Revision: https://phabricator.services.mozilla.com/D31438
--HG--
extra : source : eadeacbe44838a0db21d5f535fd14bfd62455a22
It's possible for front-end references to nsIRemoteTab to outlive the IPDL actor. When
this happens, we should ignore methods and property accesses.
The one special case is that some code expects to be able to
access the TabId after the browser has been destroyed. For this
we can just cache the ID.
Differential Revision: https://phabricator.services.mozilla.com/D31449
--HG--
extra : rebase_source : 06791db921203a5dfc6cc386e420bfa0de113941
extra : histedit_source : 4617c237d14e01cdbfff66d391069bcdf2267c51
BrowserParent is cycle collected and supported weak references, so this commit adds support
for these things to BrowserHost.
Differential Revision: https://phabricator.services.mozilla.com/D31448
--HG--
extra : rebase_source : a69b461b202600f6a9421e646fb425adac60bee3
extra : histedit_source : 78f526f4aecf7172a1c9629c991dcade4585b3ce
This commit finally updates some nsIRemoteTab methods to apply
to the whole tree of BrowserParent's.
Differential Revision: https://phabricator.services.mozilla.com/D31447
--HG--
extra : rebase_source : 902ba51c6ac3e808bb607e7ef5a0d52893a7b1b9
extra : histedit_source : 01377150da3f7acc2afe020a42bfc74e0aba3f21
This commit moves the actual implementation of nsIRemoteTab from BrowserParent
to BrowserHost, without any functional changes.
Differential Revision: https://phabricator.services.mozilla.com/D31445
--HG--
extra : rebase_source : 2e6533dfa69a3278300eb70d5258bcd0a3aba68b
extra : histedit_source : a26ba68b78eb6d16cdffbc630f4410c5dd46a367
This commit removes nsIRemoteTab as a parent class from BrowserParent,
so that BrowserHost is the only concrete implementation of nsIRemoteTab.
Some static_cast's are updated to cast to BrowserHost, and other places
have to be updated to pass a BrowserHost instead of a BrowserParent.
WindowGlobalParent had a getter to return it's managing BrowserParent
as a nsIRemoteTab. I couldn't find a use of this in-tree, so I've just
opt-ed to remove it. If there's a use-case, we can add something back
in.
Differential Revision: https://phabricator.services.mozilla.com/D31444
--HG--
extra : rebase_source : 63070e3c2b90c9134f9106028e124935c8dad009
extra : histedit_source : 807f2ff684d86008077be07b0894f39a925fe778
This commit implements nsIRemoteTab in BrowserHost by delegating to nsIRemoteTab. In a
future commit, these methods will be implemented by BrowserHost.
Differential Revision: https://phabricator.services.mozilla.com/D31443
--HG--
extra : rebase_source : aa2e71aadfd9bd99cc70b5d31d50a5cf52843027
extra : histedit_source : a2e0240467df745edbbb9836797d3dc97bd1a5ff
RemoteBrowser is a common interface between the chrome/content process cases for nsFrameLoader,
that allows us to abstract IPC details away. BrowserHost is a concrete implementation for
the chrome process, while BrowserBridgeHost implements the content process case.
Differential Revision: https://phabricator.services.mozilla.com/D31438
--HG--
extra : rebase_source : 3518e45799a46f9bef57a36049fd7ae10f03aee6
extra : histedit_source : c8ea0b064234163284b9a161523c6bb2b6cba6c2