Bug 1770403, part 2 - Remove mStorageAccessPermissionGranted from the outer window, r=anti-tracking-reviewers,timhuang
With the use of mStorageAccessPermissionGranted reduced to a single meaning, it turns out to be entirely redundant with the variable on the inner window. Depends on D147867 Differential Revision: https://phabricator.services.mozilla.com/D147868
This commit is contained in:
@@ -2743,29 +2743,9 @@ nsresult nsDocShell::SetDocLoaderParent(nsDocLoader* aParent) {
|
||||
mContentListener->SetParentContentListener(parentURIListener);
|
||||
}
|
||||
|
||||
// Inform windows when they're being removed from their parent.
|
||||
if (!aParent) {
|
||||
MaybeClearStorageAccessFlag();
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void nsDocShell::MaybeClearStorageAccessFlag() {
|
||||
if (mScriptGlobal) {
|
||||
// Tell our window that the parent has now changed.
|
||||
mScriptGlobal->ParentWindowChanged();
|
||||
|
||||
// Tell all of our children about the change recursively as well.
|
||||
for (auto* childDocLoader : mChildList.ForwardRange()) {
|
||||
nsCOMPtr<nsIDocShell> child = do_QueryObject(childDocLoader);
|
||||
if (child) {
|
||||
static_cast<nsDocShell*>(child.get())->MaybeClearStorageAccessFlag();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void nsDocShell::MaybeRestoreWindowName() {
|
||||
if (!StaticPrefs::privacy_window_name_update_enabled()) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user