Revert "Bug 1966658 - Populate the partitionedPrincipal to the SessionHistoryEntry in the parent process. r=smaug,sessionstore-reviewers,core-sessionstore-reviewers,farre"

This reverts commit 52c31c4da0.
This commit is contained in:
Alexandru Marc
2025-05-22 10:20:45 +03:00
committed by amarc@mozilla.com
parent e497194fb3
commit 2b5b645133
15 changed files with 38 additions and 164 deletions

View File

@@ -289,8 +289,6 @@ run-if = ["fission"]
["browser_searchModeSwitcher_restore.js"] ["browser_searchModeSwitcher_restore.js"]
["browser_sessionHistory_partitionedPrincipalToInherit.js"]
["browser_sessionHistory.js"] ["browser_sessionHistory.js"]
https_first_disabled = true https_first_disabled = true
support-files = ["file_sessionHistory_hashchange.html"] support-files = ["file_sessionHistory_hashchange.html"]

View File

@@ -1,108 +0,0 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
add_task(async function test_partitioned_principal_to_inherit() {
if (!Services.appinfo.sessionHistoryInParent) {
ok(true, "sessionHistoryInParent is not enabled, skipping the test.");
return;
}
// Create a new tab.
let tab = await BrowserTestUtils.openNewForegroundTab(
gBrowser,
"https://example.com"
);
let browser = tab.linkedBrowser;
// Get the last entry in the session history.
let sh = browser.browsingContext.sessionHistory;
let entry = sh.getEntryAtIndex(sh.count - 1);
let partitionedPrincipalToInherit = entry.partitionedPrincipalToInherit;
// Check that the partitioned principal to inherit is properly set.
ok(partitionedPrincipalToInherit, "partitionedPrincipalToInherit is set");
is(
partitionedPrincipalToInherit.originAttributes.partitionKey,
"(https,example.com)",
"correct partitionKey"
);
BrowserTestUtils.removeTab(tab);
});
add_task(async function test_partitioned_Principal_to_inherit_in_iframe() {
if (!Services.appinfo.sessionHistoryInParent) {
ok(true, "sessionHistoryInParent is not enabled, skipping the test.");
return;
}
// Create a new tab.
let tab = await BrowserTestUtils.openNewForegroundTab(
gBrowser,
"https://example.com"
);
let browser = tab.linkedBrowser;
// Load a same-origin iframe
await SpecialPowers.spawn(browser, [], async _ => {
let iframe = content.document.createElement("iframe");
iframe.src = "https://example.com";
await new content.Promise(resolve => {
iframe.onload = resolve;
content.document.body.appendChild(iframe);
});
});
// Get the last child entry in the session history for the same-origin iframe.
let sh = browser.browsingContext.sessionHistory;
let entry = sh.getEntryAtIndex(sh.count - 1);
let childEntry = entry.GetChildAt(entry.childCount - 1);
let partitionedPrincipalToInherit = childEntry.partitionedPrincipalToInherit;
// Check that the partitioned principal to inherit is properly set.
ok(partitionedPrincipalToInherit, "partitionedPrincipalToInherit is set");
is(
partitionedPrincipalToInherit.originNoSuffix,
"https://example.com",
"correct originNoSuffix in the same-origin iframe"
);
is(
partitionedPrincipalToInherit.originAttributes.partitionKey,
"(https,example.com)",
"correct partitionKey in the same-origin iframe"
);
// Load a cross-site iframe.
await SpecialPowers.spawn(browser, [], async _ => {
let iframe = content.document.createElement("iframe");
iframe.src = "https://example.net";
await new content.Promise(resolve => {
iframe.onload = resolve;
content.document.body.appendChild(iframe);
});
});
// Get the last child entry in the session history for the cross-site iframe.
entry = sh.getEntryAtIndex(sh.count - 1);
childEntry = entry.GetChildAt(entry.childCount - 1);
partitionedPrincipalToInherit = childEntry.partitionedPrincipalToInherit;
// Check that the partitioned principal to inherit is properly set.
ok(partitionedPrincipalToInherit, "partitionedPrincipalToInherit is set");
is(
partitionedPrincipalToInherit.originNoSuffix,
"https://example.net",
"correct originNoSuffix in the cross-site iframe"
);
is(
partitionedPrincipalToInherit.originAttributes.partitionKey,
"(https,example.com)",
"correct partitionKey in the cross-site iframe"
);
BrowserTestUtils.removeTab(tab);
});

View File

@@ -3791,7 +3791,7 @@ void BrowsingContext::SessionHistoryCommit(
const LoadingSessionHistoryInfo& aInfo, uint32_t aLoadType, const LoadingSessionHistoryInfo& aInfo, uint32_t aLoadType,
nsIURI* aPreviousURI, SessionHistoryInfo* aPreviousActiveEntry, nsIURI* aPreviousURI, SessionHistoryInfo* aPreviousActiveEntry,
bool aPersist, bool aCloneEntryChildren, bool aChannelExpired, bool aPersist, bool aCloneEntryChildren, bool aChannelExpired,
uint32_t aCacheKey, nsIPrincipal* aPartitionedPrincipal) { uint32_t aCacheKey) {
nsID changeID = {}; nsID changeID = {};
if (XRE_IsContentProcess()) { if (XRE_IsContentProcess()) {
RefPtr<ChildSHistory> rootSH = Top()->GetChildSessionHistory(); RefPtr<ChildSHistory> rootSH = Top()->GetChildSessionHistory();
@@ -3830,11 +3830,11 @@ void BrowsingContext::SessionHistoryCommit(
ContentChild* cc = ContentChild::GetSingleton(); ContentChild* cc = ContentChild::GetSingleton();
mozilla::Unused << cc->SendHistoryCommit( mozilla::Unused << cc->SendHistoryCommit(
this, aInfo.mLoadId, changeID, aLoadType, aPersist, aCloneEntryChildren, this, aInfo.mLoadId, changeID, aLoadType, aPersist, aCloneEntryChildren,
aChannelExpired, aCacheKey, aPartitionedPrincipal); aChannelExpired, aCacheKey);
} else { } else {
Canonical()->SessionHistoryCommit( Canonical()->SessionHistoryCommit(aInfo.mLoadId, changeID, aLoadType,
aInfo.mLoadId, changeID, aLoadType, aPersist, aCloneEntryChildren, aPersist, aCloneEntryChildren,
aChannelExpired, aCacheKey, aPartitionedPrincipal); aChannelExpired, aCacheKey);
} }
} }

View File

@@ -867,8 +867,7 @@ class BrowsingContext : public nsILoadContext, public nsWrapperCache {
uint32_t aLoadType, nsIURI* aCurrentURI, uint32_t aLoadType, nsIURI* aCurrentURI,
SessionHistoryInfo* aPreviousActiveEntry, SessionHistoryInfo* aPreviousActiveEntry,
bool aPersist, bool aCloneEntryChildren, bool aPersist, bool aCloneEntryChildren,
bool aChannelExpired, uint32_t aCacheKey, bool aChannelExpired, uint32_t aCacheKey);
nsIPrincipal* aPartitionedPrincipal);
// Set a new active entry on this browsing context. This is used for // Set a new active entry on this browsing context. This is used for
// implementing history.pushState/replaceState and same document navigations. // implementing history.pushState/replaceState and same document navigations.

View File

@@ -1013,8 +1013,7 @@ void CanonicalBrowsingContext::CallOnTopDescendants(
void CanonicalBrowsingContext::SessionHistoryCommit( void CanonicalBrowsingContext::SessionHistoryCommit(
uint64_t aLoadId, const nsID& aChangeID, uint32_t aLoadType, bool aPersist, uint64_t aLoadId, const nsID& aChangeID, uint32_t aLoadType, bool aPersist,
bool aCloneEntryChildren, bool aChannelExpired, uint32_t aCacheKey, bool aCloneEntryChildren, bool aChannelExpired, uint32_t aCacheKey) {
nsIPrincipal* aPartitionedPrincipal) {
MOZ_LOG(gSHLog, LogLevel::Verbose, MOZ_LOG(gSHLog, LogLevel::Verbose,
("CanonicalBrowsingContext::SessionHistoryCommit %p %" PRIu64, this, ("CanonicalBrowsingContext::SessionHistoryCommit %p %" PRIu64, this,
aLoadId)); aLoadId));
@@ -1038,7 +1037,6 @@ void CanonicalBrowsingContext::SessionHistoryCommit(
newActiveEntry->SharedInfo()->mExpired = true; newActiveEntry->SharedInfo()->mExpired = true;
} }
newActiveEntry->SetPartitionedPrincipalToInherit(aPartitionedPrincipal);
bool loadFromSessionHistory = !newActiveEntry->ForInitialLoad(); bool loadFromSessionHistory = !newActiveEntry->ForInitialLoad();
newActiveEntry->SetForInitialLoad(false); newActiveEntry->SetForInitialLoad(false);
SessionHistoryEntry::RemoveLoadId(aLoadId); SessionHistoryEntry::RemoveLoadId(aLoadId);

View File

@@ -170,8 +170,7 @@ class CanonicalBrowsingContext final : public BrowsingContext {
void SessionHistoryCommit(uint64_t aLoadId, const nsID& aChangeID, void SessionHistoryCommit(uint64_t aLoadId, const nsID& aChangeID,
uint32_t aLoadType, bool aPersist, uint32_t aLoadType, bool aPersist,
bool aCloneEntryChildren, bool aChannelExpired, bool aCloneEntryChildren, bool aChannelExpired,
uint32_t aCacheKey, uint32_t aCacheKey);
nsIPrincipal* aPartitionedPrincipal);
// Calls the session history listeners' OnHistoryReload, storing the result in // Calls the session history listeners' OnHistoryReload, storing the result in
// aCanReload. If aCanReload is set to true and we have an active or a loading // aCanReload. If aCanReload is set to true and we have an active or a loading

View File

@@ -9044,7 +9044,7 @@ nsresult nsDocShell::HandleSameDocumentNavigation(
*mLoadingEntry, mLoadType, mCurrentURI, previousActiveEntry.get(), *mLoadingEntry, mLoadType, mCurrentURI, previousActiveEntry.get(),
true, true, true, true,
/* No expiration update on the same document loads*/ /* No expiration update on the same document loads*/
false, cacheKey, doc->PartitionedPrincipal()); false, cacheKey);
// FIXME Need to set postdata. // FIXME Need to set postdata.
// Set the title for the SH entry for this target url so that // Set the title for the SH entry for this target url so that
@@ -9104,9 +9104,6 @@ nsresult nsDocShell::HandleSameDocumentNavigation(
// SH menus in go/back/forward buttons won't be empty for this. // SH menus in go/back/forward buttons won't be empty for this.
mActiveEntry->SetTitle(mTitle); mActiveEntry->SetTitle(mTitle);
mActiveEntry->SetPartitionedPrincipalToInherit(
doc->PartitionedPrincipal());
if (scrollRestorationIsManual.isSome()) { if (scrollRestorationIsManual.isSome()) {
mActiveEntry->SetScrollRestorationIsManual( mActiveEntry->SetScrollRestorationIsManual(
scrollRestorationIsManual.value()); scrollRestorationIsManual.value());
@@ -11612,7 +11609,7 @@ nsresult nsDocShell::UpdateURLAndHistory(
/* aReferrerInfo = */ referrerInfo, /* aReferrerInfo = */ referrerInfo,
/* aTriggeringPrincipal = */ aDocument->NodePrincipal(), /* aTriggeringPrincipal = */ aDocument->NodePrincipal(),
csp, title, scrollRestorationIsManual, aData, csp, title, scrollRestorationIsManual, aData,
uriWasModified, aDocument->PartitionedPrincipal()); uriWasModified);
} else { } else {
// Since we're not changing which page we have loaded, pass // Since we're not changing which page we have loaded, pass
// true for aCloneChildren. // true for aCloneChildren.
@@ -11666,7 +11663,7 @@ nsresult nsDocShell::UpdateURLAndHistory(
/* aReferrerInfo = */ referrerInfo, aDocument->NodePrincipal(), /* aReferrerInfo = */ referrerInfo, aDocument->NodePrincipal(),
aDocument->GetCsp(), title, aDocument->GetCsp(), title,
mActiveEntry && mActiveEntry->GetScrollRestorationIsManual(), aData, mActiveEntry && mActiveEntry->GetScrollRestorationIsManual(), aData,
uriWasModified, aDocument->PartitionedPrincipal()); uriWasModified);
} else { } else {
// Step 3. // Step 3.
newSHEntry = mOSHE; newSHEntry = mOSHE;
@@ -12115,8 +12112,7 @@ void nsDocShell::UpdateActiveEntry(
nsIURI* aOriginalURI, nsIReferrerInfo* aReferrerInfo, nsIURI* aOriginalURI, nsIReferrerInfo* aReferrerInfo,
nsIPrincipal* aTriggeringPrincipal, nsIContentSecurityPolicy* aCsp, nsIPrincipal* aTriggeringPrincipal, nsIContentSecurityPolicy* aCsp,
const nsAString& aTitle, bool aScrollRestorationIsManual, const nsAString& aTitle, bool aScrollRestorationIsManual,
nsIStructuredCloneContainer* aData, bool aURIWasModified, nsIStructuredCloneContainer* aData, bool aURIWasModified) {
nsIPrincipal* aPartitionedPrincipal) {
MOZ_ASSERT(mozilla::SessionHistoryInParent()); MOZ_ASSERT(mozilla::SessionHistoryInParent());
MOZ_ASSERT(aURI, "uri is null"); MOZ_ASSERT(aURI, "uri is null");
MOZ_ASSERT(mLoadType == LOAD_PUSHSTATE, MOZ_ASSERT(mLoadType == LOAD_PUSHSTATE,
@@ -12151,7 +12147,6 @@ void nsDocShell::UpdateActiveEntry(
mActiveEntry->SetStateData(static_cast<nsStructuredCloneContainer*>(aData)); mActiveEntry->SetStateData(static_cast<nsStructuredCloneContainer*>(aData));
mActiveEntry->SetURIWasModified(aURIWasModified); mActiveEntry->SetURIWasModified(aURIWasModified);
mActiveEntry->SetScrollRestorationIsManual(aScrollRestorationIsManual); mActiveEntry->SetScrollRestorationIsManual(aScrollRestorationIsManual);
mActiveEntry->SetPartitionedPrincipalToInherit(aPartitionedPrincipal);
if (replace) { if (replace) {
mBrowsingContext->ReplaceActiveSessionHistoryEntry(mActiveEntry.get()); mBrowsingContext->ReplaceActiveSessionHistoryEntry(mActiveEntry.get());
@@ -13892,13 +13887,6 @@ void nsDocShell::MoveLoadingToActiveEntry(bool aPersist, bool aExpired,
if (aCacheKey != 0) { if (aCacheKey != 0) {
mActiveEntry->SetCacheKey(aCacheKey); mActiveEntry->SetCacheKey(aCacheKey);
} }
nsCOMPtr<nsIPrincipal> partitionedPrincipal;
RefPtr<Document> doc = GetDocument();
if (doc) {
partitionedPrincipal = doc->PartitionedPrincipal();
}
mActiveEntry->SetPartitionedPrincipalToInherit(partitionedPrincipal);
MOZ_ASSERT(loadingEntry); MOZ_ASSERT(loadingEntry);
uint32_t loadType = uint32_t loadType =
mLoadType == LOAD_ERROR_PAGE ? mFailedLoadType : mLoadType; mLoadType == LOAD_ERROR_PAGE ? mFailedLoadType : mLoadType;
@@ -13909,7 +13897,7 @@ void nsDocShell::MoveLoadingToActiveEntry(bool aPersist, bool aExpired,
// URI, but in that case mCurrentURI won't be null here. // URI, but in that case mCurrentURI won't be null here.
mBrowsingContext->SessionHistoryCommit( mBrowsingContext->SessionHistoryCommit(
*loadingEntry, loadType, aPreviousURI, previousActiveEntry.get(), *loadingEntry, loadType, aPreviousURI, previousActiveEntry.get(),
aPersist, false, aExpired, aCacheKey, partitionedPrincipal); aPersist, false, aExpired, aCacheKey);
} }
// Only update navigation if the new entry will be persisted (i.e., is not // Only update navigation if the new entry will be persisted (i.e., is not

View File

@@ -625,8 +625,7 @@ class nsDocShell final : public nsDocLoader,
nsIURI* aURI, nsIURI* aOriginalURI, nsIReferrerInfo* aReferrerInfo, nsIURI* aURI, nsIURI* aOriginalURI, nsIReferrerInfo* aReferrerInfo,
nsIPrincipal* aTriggeringPrincipal, nsIContentSecurityPolicy* aCsp, nsIPrincipal* aTriggeringPrincipal, nsIContentSecurityPolicy* aCsp,
const nsAString& aTitle, bool aScrollRestorationIsManual, const nsAString& aTitle, bool aScrollRestorationIsManual,
nsIStructuredCloneContainer* aData, bool aURIWasModified, nsIStructuredCloneContainer* aData, bool aURIWasModified);
nsIPrincipal* aPartitionedPrincipal);
nsresult AddChildSHEntry(nsISHEntry* aCloneRef, nsISHEntry* aNewEntry, nsresult AddChildSHEntry(nsISHEntry* aCloneRef, nsISHEntry* aNewEntry,
int32_t aChildOffset, uint32_t aLoadType, int32_t aChildOffset, uint32_t aLoadType,

View File

@@ -227,11 +227,6 @@ nsIPrincipal* SessionHistoryInfo::GetPartitionedPrincipalToInherit() const {
return mSharedState.Get()->mPartitionedPrincipalToInherit; return mSharedState.Get()->mPartitionedPrincipalToInherit;
} }
void SessionHistoryInfo::SetPartitionedPrincipalToInherit(
nsIPrincipal* aPartitionedPrincipal) {
mSharedState.Get()->mPartitionedPrincipalToInherit = aPartitionedPrincipal;
}
nsIContentSecurityPolicy* SessionHistoryInfo::GetCsp() const { nsIContentSecurityPolicy* SessionHistoryInfo::GetCsp() const {
return mSharedState.Get()->mCsp; return mSharedState.Get()->mCsp;
} }
@@ -1670,10 +1665,12 @@ bool IPDLParamTraits<dom::SessionHistoryInfo>::Read(
aResult->mSharedState.Get()->mPrincipalToInherit) aResult->mSharedState.Get()->mPrincipalToInherit)
: !aResult->mSharedState.Get()->mPrincipalToInherit, : !aResult->mSharedState.Get()->mPrincipalToInherit,
"We don't expect this to change!"); "We don't expect this to change!");
MOZ_ASSERT_IF( MOZ_ASSERT(
aResult->mSharedState.Get()->mPartitionedPrincipalToInherit, partitionedPrincipalToInherit
aResult->mSharedState.Get()->mPartitionedPrincipalToInherit->Equals( ? partitionedPrincipalToInherit->Equals(
partitionedPrincipalToInherit)); aResult->mSharedState.Get()->mPartitionedPrincipalToInherit)
: !aResult->mSharedState.Get()->mPartitionedPrincipalToInherit,
"We don't expect this to change!");
MOZ_ASSERT( MOZ_ASSERT(
csp ? nsCSPContext::Equals(csp, aResult->mSharedState.Get()->mCsp) csp ? nsCSPContext::Equals(csp, aResult->mSharedState.Get()->mCsp)
: !aResult->mSharedState.Get()->mCsp, : !aResult->mSharedState.Get()->mCsp,

View File

@@ -141,7 +141,6 @@ class SessionHistoryInfo {
nsIPrincipal* GetPrincipalToInherit() const; nsIPrincipal* GetPrincipalToInherit() const;
nsIPrincipal* GetPartitionedPrincipalToInherit() const; nsIPrincipal* GetPartitionedPrincipalToInherit() const;
void SetPartitionedPrincipalToInherit(nsIPrincipal* aPrincipal);
nsIContentSecurityPolicy* GetCsp() const; nsIContentSecurityPolicy* GetCsp() const;

View File

@@ -7527,13 +7527,7 @@ mozilla::ipc::IPCResult ContentParent::RecvHistoryCommit(
const MaybeDiscarded<BrowsingContext>& aContext, const uint64_t& aLoadID, const MaybeDiscarded<BrowsingContext>& aContext, const uint64_t& aLoadID,
const nsID& aChangeID, const uint32_t& aLoadType, const bool& aPersist, const nsID& aChangeID, const uint32_t& aLoadType, const bool& aPersist,
const bool& aCloneEntryChildren, const bool& aChannelExpired, const bool& aCloneEntryChildren, const bool& aChannelExpired,
const uint32_t& aCacheKey, nsIPrincipal* aPartitionedPrincipal) { const uint32_t& aCacheKey) {
if (!ValidatePrincipal(aPartitionedPrincipal,
{ValidatePrincipalOptions::AllowNullPtr,
ValidatePrincipalOptions::AllowSystem})) {
LogAndAssertFailedPrincipalValidationInfo(aPartitionedPrincipal, __func__);
}
if (!aContext.IsDiscarded()) { if (!aContext.IsDiscarded()) {
CanonicalBrowsingContext* canonical = aContext.get_canonical(); CanonicalBrowsingContext* canonical = aContext.get_canonical();
if (!canonical) { if (!canonical) {
@@ -7542,7 +7536,7 @@ mozilla::ipc::IPCResult ContentParent::RecvHistoryCommit(
} }
canonical->SessionHistoryCommit(aLoadID, aChangeID, aLoadType, aPersist, canonical->SessionHistoryCommit(aLoadID, aChangeID, aLoadType, aPersist,
aCloneEntryChildren, aChannelExpired, aCloneEntryChildren, aChannelExpired,
aCacheKey, aPartitionedPrincipal); aCacheKey);
} }
return IPC_OK(); return IPC_OK();
} }

View File

@@ -1304,7 +1304,7 @@ class ContentParent final : public PContentParent,
const MaybeDiscarded<BrowsingContext>& aContext, const uint64_t& aLoadID, const MaybeDiscarded<BrowsingContext>& aContext, const uint64_t& aLoadID,
const nsID& aChangeID, const uint32_t& aLoadType, const bool& aPersist, const nsID& aChangeID, const uint32_t& aLoadType, const bool& aPersist,
const bool& aCloneEntryChildren, const bool& aChannelExpired, const bool& aCloneEntryChildren, const bool& aChannelExpired,
const uint32_t& aCacheKey, nsIPrincipal* aPartitionedPrincipal); const uint32_t& aCacheKey);
MOZ_CAN_RUN_SCRIPT_BOUNDARY MOZ_CAN_RUN_SCRIPT_BOUNDARY
mozilla::ipc::IPCResult RecvHistoryGo( mozilla::ipc::IPCResult RecvHistoryGo(

View File

@@ -1784,8 +1784,7 @@ parent:
async HistoryCommit(MaybeDiscardedBrowsingContext aContext, async HistoryCommit(MaybeDiscardedBrowsingContext aContext,
uint64_t aLoadID, nsID aChangeID, uint32_t aLoadType, uint64_t aLoadID, nsID aChangeID, uint32_t aLoadType,
bool aPersist, bool aCloneEntryChildren, bool aPersist, bool aCloneEntryChildren,
bool aChannelExpired, uint32_t aCacheKey, bool aChannelExpired, uint32_t aCacheKey);
nullable nsIPrincipal aPartitionedPrincipal);
async HistoryGo(MaybeDiscardedBrowsingContext aContext, int32_t aOffset, async HistoryGo(MaybeDiscardedBrowsingContext aContext, int32_t aOffset,
uint64_t aHistoryEpoch, bool aRequireUserInteraction, uint64_t aHistoryEpoch, bool aRequireUserInteraction,

View File

@@ -662,8 +662,7 @@ static Result<SessionHistoryEntry*, const char*> ValidateHistoryLoad(
aLoadState->PrincipalToInherit())) { aLoadState->PrincipalToInherit())) {
return Err("PrincipalToInherit"); return Err("PrincipalToInherit");
} }
if (snapshot->GetPartitionedPrincipalToInherit() && if (!principalEq(snapshot->GetPartitionedPrincipalToInherit(),
!principalEq(snapshot->GetPartitionedPrincipalToInherit(),
aLoadState->PartitionedPrincipalToInherit())) { aLoadState->PartitionedPrincipalToInherit())) {
return Err("PartitionedPrincipalToInherit"); return Err("PartitionedPrincipalToInherit");
} }

View File

@@ -277,6 +277,13 @@ var SessionHistoryInternal = {
); );
} }
if (shEntry.partitionedPrincipalToInherit) {
entry.partitionedPrincipalToInherit_base64 =
lazy.E10SUtils.serializePrincipal(
shEntry.partitionedPrincipalToInherit
);
}
entry.hasUserInteraction = shEntry.hasUserInteraction; entry.hasUserInteraction = shEntry.hasUserInteraction;
if (shEntry.triggeringPrincipal) { if (shEntry.triggeringPrincipal) {
@@ -563,6 +570,12 @@ var SessionHistoryInternal = {
); );
// As both partitionedPrincipal and principalToInherit are both not required to load // As both partitionedPrincipal and principalToInherit are both not required to load
// it's ok to keep these undefined when we don't have a previously defined principal. // it's ok to keep these undefined when we don't have a previously defined principal.
if (entry.partitionedPrincipalToInherit_base64) {
shEntry.partitionedPrincipalToInherit =
lazy.E10SUtils.deserializePrincipal(
entry.partitionedPrincipalToInherit_base64
);
}
if (entry.principalToInherit_base64) { if (entry.principalToInherit_base64) {
shEntry.principalToInherit = lazy.E10SUtils.deserializePrincipal( shEntry.principalToInherit = lazy.E10SUtils.deserializePrincipal(
entry.principalToInherit_base64 entry.principalToInherit_base64