Bug 1182316: Part 2 - Rework FORWARD_TO_OUTER_OR_THROW. r=peterv
This commit is contained in:
@@ -3719,12 +3719,10 @@ nsDocShell::CanAccessItem(nsIDocShellTreeItem* aTargetItem,
|
||||
static bool
|
||||
ItemIsActive(nsIDocShellTreeItem* aItem)
|
||||
{
|
||||
nsCOMPtr<nsIDOMWindow> window = aItem->GetWindow();
|
||||
|
||||
if (window) {
|
||||
bool isClosed;
|
||||
|
||||
if (NS_SUCCEEDED(window->GetClosed(&isClosed)) && !isClosed) {
|
||||
if (nsCOMPtr<nsIDOMWindow> window = aItem->GetWindow()) {
|
||||
auto* win = static_cast<nsGlobalWindow*>(window.get());
|
||||
MOZ_ASSERT(win->IsOuterWindow());
|
||||
if (!win->GetClosedOuter()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user