diff --git a/dom/base/nsCCUncollectableMarker.cpp b/dom/base/nsCCUncollectableMarker.cpp index 7936d07b051d..8e54b38c1fd0 100644 --- a/dom/base/nsCCUncollectableMarker.cpp +++ b/dom/base/nsCCUncollectableMarker.cpp @@ -508,7 +508,7 @@ mozilla::dom::TraceBlackJS(JSTracer* aTrc, uint32_t aGCNumber, bool aIsShutdownG if (windowsById) { for (auto iter = windowsById->Iter(); !iter.Done(); iter.Next()) { nsGlobalWindow* window = iter.Data(); - if (!window->IsCleanedUp() && window->IsOuterWindow()) { + if (window->GetDocShell() && window->IsOuterWindow()) { window->TraceGlobalJSObject(aTrc); EventListenerManager* elm = window->GetExistingListenerManager(); if (elm) { diff --git a/dom/base/nsGlobalWindow.h b/dom/base/nsGlobalWindow.h index 9e112f6543cc..e8037bf920ef 100644 --- a/dom/base/nsGlobalWindow.h +++ b/dom/base/nsGlobalWindow.h @@ -668,12 +668,6 @@ public: mCleanedUp); } - bool - IsCleanedUp() const - { - return mCleanedUp; - } - bool HadOriginalOpener() const {