Bug 1162789 - Add a comment explaining why mForm is not set to null during unlink

Comment-only, landed on a CLOSED TREE, DONTBUILD
This commit is contained in:
Ehsan Akhgari 2015-05-07 23:13:13 -04:00
Родитель 21ce8b6fa0
Коммит 15c042b804
1 изменённых файлов: 3 добавлений и 0 удалений

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

@ -121,6 +121,9 @@ HTMLFormControlsCollection::FlushPendingNotifications()
NS_IMPL_CYCLE_COLLECTION_CLASS(HTMLFormControlsCollection)
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(HTMLFormControlsCollection)
// Note: We intentionally don't set tmp->mForm to nullptr here, since doing
// so may result in crashes because of inconsistent null-checking after the
// object gets unlinked.
tmp->Clear();
NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER
NS_IMPL_CYCLE_COLLECTION_UNLINK_END