diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index 66a8123be27..7a7030ec548 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -1404,8 +1404,9 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(nsGlobalWindow) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(nsGlobalWindow) - if (tmp->mDoc && nsCCUncollectableMarker::InGeneration( - cb, tmp->mDoc->GetMarkedCCGeneration())) { + if ((tmp->mDoc && nsCCUncollectableMarker::InGeneration( + cb, tmp->mDoc->GetMarkedCCGeneration())) || + (nsCCUncollectableMarker::sGeneration && tmp->IsBlack())) { return NS_SUCCESS_INTERRUPTED_TRAVERSE; }