Bug 743199 - Unmark Document's and Window's ELM, r=mccr8

This commit is contained in:
Olli Pettay 2012-04-07 10:12:03 +03:00
Родитель 1cd93f53c0
Коммит af7d906b8d
2 изменённых файлов: 12 добавлений и 1 удалений

Просмотреть файл

@ -1719,7 +1719,13 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE_WITH_DESTROY(nsDocument,
nsNodeUtils::LastRelease(this))
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_BEGIN(nsDocument)
return nsGenericElement::CanSkip(tmp, aRemovingAllowed);
if (nsGenericElement::CanSkip(tmp, aRemovingAllowed)) {
nsEventListenerManager* elm = tmp->GetListenerManager(false);
if (elm) {
elm->UnmarkGrayJSListeners();
}
return true;
}
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_END
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_IN_CC_BEGIN(nsDocument)

Просмотреть файл

@ -1439,6 +1439,11 @@ NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_BEGIN(nsGlobalWindow)
if (tmp->mCachedXBLPrototypeHandlers.IsInitialized()) {
tmp->mCachedXBLPrototypeHandlers.EnumerateRead(MarkXBLHandlers, nsnull);
}
nsEventListenerManager* elm = tmp->GetListenerManager(false);
if (elm) {
elm->UnmarkGrayJSListeners();
}
tmp->UnmarkGrayTimers();
return true;
}
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_END