Bug 714162 - Don't traverse certainly alive selections, additional patch, r=mccr8

This commit is contained in:
Olli Pettay 2012-01-06 21:08:08 +02:00
Родитель 0893bb1b6b
Коммит 6623e31896
1 изменённых файлов: 5 добавлений и 2 удалений

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

@ -66,7 +66,7 @@
#include "nsIDOMNodeList.h" #include "nsIDOMNodeList.h"
#include "nsTArray.h" #include "nsTArray.h"
#include "nsIScrollableFrame.h" #include "nsIScrollableFrame.h"
#include "nsCCUncollectableMarker.h"
#include "nsISelectionListener.h" #include "nsISelectionListener.h"
#include "nsIContentIterator.h" #include "nsIContentIterator.h"
#include "nsIDocumentEncoder.h" #include "nsIDocumentEncoder.h"
@ -760,7 +760,10 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsFrameSelection)
NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mMaintainRange) NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mMaintainRange)
NS_IMPL_CYCLE_COLLECTION_UNLINK_END NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(nsFrameSelection) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(nsFrameSelection)
if (tmp->mShell) { if (tmp->mShell && tmp->mShell->GetDocument() &&
nsCCUncollectableMarker::InGeneration(cb,
tmp->mShell->GetDocument()->
GetMarkedCCGeneration())) {
return NS_SUCCESS_INTERRUPTED_TRAVERSE; return NS_SUCCESS_INTERRUPTED_TRAVERSE;
} }
PRInt32 i; PRInt32 i;