зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1594529 - Adding in asserts for LoadURI to ensure we have the correct contentPolicyType, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D70714 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
349e62fa06
Коммит
740b0cb1d4
|
@ -9702,6 +9702,13 @@ nsresult nsDocShell::DoURILoad(nsDocShellLoadState* aLoadState,
|
|||
securityFlags |= nsILoadInfo::SEC_FORCE_INHERIT_PRINCIPAL;
|
||||
}
|
||||
|
||||
// Must never have a parent for TYPE_DOCUMENT loads
|
||||
MOZ_ASSERT_IF(contentPolicyType == nsIContentPolicy::TYPE_DOCUMENT,
|
||||
!mBrowsingContext->GetParent());
|
||||
// Subdocuments must have a parent
|
||||
MOZ_ASSERT_IF(contentPolicyType == nsIContentPolicy::TYPE_SUBDOCUMENT,
|
||||
mBrowsingContext->GetParent());
|
||||
|
||||
RefPtr<LoadInfo> loadInfo =
|
||||
(contentPolicyType == nsIContentPolicy::TYPE_DOCUMENT)
|
||||
? new LoadInfo(loadingWindow, aLoadState->TriggeringPrincipal(),
|
||||
|
|
Загрузка…
Ссылка в новой задаче