зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1594284 - Remove nsDocShell::CanAccessItem. r=annyG
Apparently Bug 1594288 removed the user of this function. Differential Revision: https://phabricator.services.mozilla.com/D57226 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
d1298045aa
Коммит
89a3198a26
|
@ -2823,29 +2823,6 @@ nsDocShell::GetSameTypeRootTreeItemIgnoreBrowserBoundaries(
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/* static */
|
||||
bool nsDocShell::CanAccessItem(nsIDocShellTreeItem* aTargetItem,
|
||||
nsIDocShellTreeItem* aAccessingItem,
|
||||
bool aConsiderOpener) {
|
||||
MOZ_ASSERT(aTargetItem, "Must have target item!");
|
||||
|
||||
if (!aAccessingItem) {
|
||||
// Good to go
|
||||
return true;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDocShell> targetDS = do_QueryInterface(aTargetItem);
|
||||
nsCOMPtr<nsIDocShell> accessingDS = do_QueryInterface(aAccessingItem);
|
||||
if (!targetDS || !accessingDS) {
|
||||
// We must be able to convert both to nsIDocShell.
|
||||
return false;
|
||||
}
|
||||
|
||||
return Cast(accessingDS)
|
||||
->mBrowsingContext->CanAccess(Cast(targetDS)->mBrowsingContext,
|
||||
aConsiderOpener);
|
||||
}
|
||||
|
||||
void nsDocShell::AssertOriginAttributesMatchPrivateBrowsing() {
|
||||
// Chrome docshells must not have a private browsing OriginAttribute
|
||||
// Content docshells must maintain the equality:
|
||||
|
|
|
@ -539,11 +539,8 @@ class nsDocShell final : public nsDocLoader,
|
|||
nsDocShell(mozilla::dom::BrowsingContext* aBrowsingContext,
|
||||
uint64_t aContentWindowID);
|
||||
|
||||
// Security checks to prevent frameset spoofing. See comments at
|
||||
// implementation sites.
|
||||
static bool CanAccessItem(nsIDocShellTreeItem* aTargetItem,
|
||||
nsIDocShellTreeItem* aAccessingItem,
|
||||
bool aConsiderOpener = true);
|
||||
// Security check to prevent frameset spoofing. See comments at
|
||||
// implementation site.
|
||||
static bool ValidateOrigin(nsIDocShellTreeItem* aOriginTreeItem,
|
||||
nsIDocShellTreeItem* aTargetTreeItem);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче