Bug 1646892 - Allow DocumentChannel process switches into the parent process. r=jya,nika

Differential Revision: https://phabricator.services.mozilla.com/D80327
This commit is contained in:
Matt Woodrow
2020-06-27 04:10:23 +00:00
parent f2b2693886
commit b90c5208a5
15 changed files with 194 additions and 77 deletions

View File

@@ -50,6 +50,7 @@ class nsDocShellLoadState final {
static nsresult CreateFromPendingChannel(nsIChannel* aPendingChannel,
uint64_t aLoadIdentifier,
uint64_t aRegistarId,
nsDocShellLoadState** aResult);
static nsresult CreateFromLoadURIOptions(
@@ -230,6 +231,10 @@ class nsDocShellLoadState final {
return mPendingRedirectedChannel;
}
uint64_t GetPendingRedirectChannelRegistrarId() const {
return mChannelRegistrarId;
}
void SetOriginalURIString(const nsCString& aOriginalURI) {
mOriginalURIString.emplace(aOriginalURI);
}
@@ -426,6 +431,11 @@ class nsDocShellLoadState final {
// when initiating the load.
mozilla::Maybe<int32_t> mCancelContentJSEpoch;
// If mPendingRedirectChannel is set, then this is the identifier
// that the parent-process equivalent channel has been registered
// with using RedirectChannelRegistrar.
uint64_t mChannelRegistrarId;
// An identifier to make it possible to examine if two loads are
// equal, and which browsing context they belong to (see
// BrowsingContext::{Get, Set}CurrentLoadIdentifier)