From ca908cb413019029e07ff6bdc601a9a41403b3f8 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Sat, 4 Apr 2020 02:42:42 +0000 Subject: [PATCH] Bug 1626404: Part 2b - Serialize source BC with LoadState. r=nika CLOSED TREE Differential Revision: https://phabricator.services.mozilla.com/D69419 --HG-- extra : source : 2ffdab0072e7dbc56d232537aafbd2c1aa80ef14 extra : intermediate-source : ec63b18da4b9c1eb280f77a800e0e987aa3f20fa --- docshell/base/nsDocShellLoadState.cpp | 2 ++ dom/ipc/DOMTypes.ipdlh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/docshell/base/nsDocShellLoadState.cpp b/docshell/base/nsDocShellLoadState.cpp index 8b0933a0da32..2d54ab4c82cd 100644 --- a/docshell/base/nsDocShellLoadState.cpp +++ b/docshell/base/nsDocShellLoadState.cpp @@ -71,6 +71,7 @@ nsDocShellLoadState::nsDocShellLoadState( mReferrerInfo = aLoadState.ReferrerInfo(); mURI = aLoadState.URI(); mOriginalURI = aLoadState.OriginalURI(); + mSourceBrowsingContext = aLoadState.SourceBrowsingContext(); mBaseURI = aLoadState.BaseURI(); mTriggeringPrincipal = aLoadState.TriggeringPrincipal(); mPrincipalToInherit = aLoadState.PrincipalToInherit(); @@ -667,6 +668,7 @@ DocShellLoadStateInit nsDocShellLoadState::Serialize() { mIsFromProcessingFrameAttributes; loadState.URI() = mURI; loadState.OriginalURI() = mOriginalURI; + loadState.SourceBrowsingContext() = mSourceBrowsingContext; loadState.BaseURI() = mBaseURI; loadState.TriggeringPrincipal() = mTriggeringPrincipal; loadState.PrincipalToInherit() = mPrincipalToInherit; diff --git a/dom/ipc/DOMTypes.ipdlh b/dom/ipc/DOMTypes.ipdlh index c01364533274..6780a87c8318 100644 --- a/dom/ipc/DOMTypes.ipdlh +++ b/dom/ipc/DOMTypes.ipdlh @@ -266,6 +266,8 @@ struct DocShellLoadStateInit // encounters a server side redirect. nsIContentSecurityPolicy Csp; + MaybeDiscardedBrowsingContext SourceBrowsingContext; + nsCString? OriginalURIString; int32_t? CancelContentJSEpoch;