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
parent f2c3a86f4a
commit dfcb2d8044

View File

@@ -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