Bug 1345433 - Bring back assertion that history entries need a valid triggeringPrincipal r=JanH,smaug

MozReview-Commit-ID: 9GfGIxkqfhM
This commit is contained in:
Thomas Nguyen
2017-10-23 18:14:28 +08:00
parent 03332b05cd
commit 859cc82307
3 changed files with 12 additions and 2 deletions

View File

@@ -13028,8 +13028,10 @@ nsDocShell::LoadHistoryEntry(nsISHEntry* aEntry, uint32_t aLoadType)
srcdoc = VoidString();
}
// If there is no valid triggeringPrincipal, we deny the load
MOZ_ASSERT(triggeringPrincipal, "need a valid triggeringPrincipal to load from history");
if (!triggeringPrincipal) {
triggeringPrincipal = nsContentUtils::GetSystemPrincipal();
return NS_ERROR_FAILURE;
}
// Passing nullptr as aSourceDocShell gives the same behaviour as before