Bug 1675097 - Use the correct sandboxing flags for initial about:blank r=asuth,smaug
Differential Revision: https://phabricator.services.mozilla.com/D99237
This commit is contained in:
@@ -6643,7 +6643,10 @@ nsresult nsDocShell::CreateAboutBlankContentViewer(
|
||||
|
||||
if (docFactory) {
|
||||
nsCOMPtr<nsIPrincipal> principal, partitionedPrincipal;
|
||||
uint32_t sandboxFlags = mBrowsingContext->GetSandboxFlags();
|
||||
const uint32_t sandboxFlags =
|
||||
mBrowsingContext->GetHasLoadedNonInitialDocument()
|
||||
? mBrowsingContext->GetSandboxFlags()
|
||||
: mBrowsingContext->GetInitialSandboxFlags();
|
||||
// If we're sandboxed, then create a new null principal. We skip
|
||||
// this if we're being created from WindowGlobalChild, since in
|
||||
// that case we already have a null principal if required.
|
||||
|
||||
Reference in New Issue
Block a user