Bug 1372662 - Part 1: Never copy sessionstorage into noopener windows, r=smaug

This commit is contained in:
Michael Layzell 2017-08-28 16:28:46 -04:00
parent d54cc4e71e
commit 2b0333c9b7

View File

@ -1222,8 +1222,9 @@ nsWindowWatcher::OpenWindowInternal(mozIDOMWindowProxy* aParent,
true);
}
// Copy the current session storage for the current domain.
if (subjectPrincipal && parentDocShell) {
// Copy the current session storage for the current domain. Don't perform the
// copy if we're forcing noopener, however.
if (!aForceNoOpener && subjectPrincipal && parentDocShell) {
nsCOMPtr<nsIDOMStorageManager> parentStorageManager =
do_QueryInterface(parentDocShell);
nsCOMPtr<nsIDOMStorageManager> newStorageManager =