Bug 1498720 - Ensure that we revoke a subframe's storage access when it is removed from the DOM r=baku
Differential Revision: https://phabricator.services.mozilla.com/D8615
This commit is contained in:
@@ -2988,6 +2988,12 @@ nsDocShell::SetDocLoaderParent(nsDocLoader* aParent)
|
|||||||
// Our parent has changed. Recompute scriptability.
|
// Our parent has changed. Recompute scriptability.
|
||||||
RecomputeCanExecuteScripts();
|
RecomputeCanExecuteScripts();
|
||||||
|
|
||||||
|
nsCOMPtr<nsPIDOMWindowOuter> window = GetWindow();
|
||||||
|
if (window) {
|
||||||
|
auto* win = nsGlobalWindowOuter::Cast(window);
|
||||||
|
win->ParentWindowChanged();
|
||||||
|
}
|
||||||
|
|
||||||
NS_ASSERTION(mInheritPrivateBrowsingId || wasPrivate == UsePrivateBrowsing(),
|
NS_ASSERTION(mInheritPrivateBrowsingId || wasPrivate == UsePrivateBrowsing(),
|
||||||
"Private browsing state changed while inheritance was disabled");
|
"Private browsing state changed while inheritance was disabled");
|
||||||
|
|
||||||
|
|||||||
@@ -737,6 +737,12 @@ public:
|
|||||||
return GetExtantDoc() && GetExtantDoc()->IsInSyncOperation();
|
return GetExtantDoc() && GetExtantDoc()->IsInSyncOperation();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ParentWindowChanged()
|
||||||
|
{
|
||||||
|
// Reset our storage access flag when we get reparented.
|
||||||
|
mHasStorageAccess = false;
|
||||||
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int32_t GetInnerWidthOuter(mozilla::ErrorResult& aError);
|
int32_t GetInnerWidthOuter(mozilla::ErrorResult& aError);
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
Reference in New Issue
Block a user