File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
toolkit/components/windowwatcher Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -959,10 +959,12 @@ nsresult nsWindowWatcher::OpenWindowInternal(
959959 activeDocsSandboxFlags = parentDoc->GetSandboxFlags ();
960960
961961 if (!aForceNoOpener) {
962- openWindowInfo->mPolicyContainerToInheritForAboutBlank =
963- parentDoc->GetPolicyContainer ();
964- openWindowInfo->mCoepToInheritForAboutBlank =
965- parentDoc->GetEmbedderPolicy ();
962+ if (Document* entryDoc = GetEntryDocument ()) {
963+ openWindowInfo->mPolicyContainerToInheritForAboutBlank =
964+ entryDoc->GetPolicyContainer ();
965+ openWindowInfo->mCoepToInheritForAboutBlank =
966+ entryDoc->GetEmbedderPolicy ();
967+ }
966968 }
967969
968970 // Check to see if this frame is allowed to navigate, but don't check if
You can’t perform that action at this time.
0 commit comments