From 780cf8ac3d004c241f70c9a2fe6583c79c5a42e9 Mon Sep 17 00:00:00 2001 From: Michael Layzell Date: Tue, 29 Nov 2016 11:50:13 -0500 Subject: [PATCH] Bug 1320997 - Ignore disconnected iframe nsPIDOMWindowOuters in TabGroup::GetTopLevelWindows, r=smaug MozReview-Commit-ID: 8wQSmcS1sUn --- dom/base/TabGroup.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dom/base/TabGroup.cpp b/dom/base/TabGroup.cpp index 871e5e1faa6c..26990743e9c8 100644 --- a/dom/base/TabGroup.cpp +++ b/dom/base/TabGroup.cpp @@ -146,7 +146,8 @@ TabGroup::GetTopLevelWindows() nsTArray array; for (nsPIDOMWindowOuter* outerWindow : mWindows) { - if (!outerWindow->GetScriptableParentOrNull()) { + if (outerWindow->GetDocShell() && + !outerWindow->GetScriptableParentOrNull()) { array.AppendElement(outerWindow); } }