-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean listAdapterUpdater state if collectionView becomes nil during u…
…pdate Summary: If an `IGListAdapterUpdater` was unable to retrieve a collection view in `[IGListAdapterUpdater performBatchUpdatesWithCollectionViewBlock:]`, it would return early without cleaning state. This would sometimes cause future updates to crash, as this `IGListAdapterUpdater`'s state would now be out-of-sync. This change also ensures that the `IGListAdapterUpdater`'s completion blocks run when `[IGListAdapterUpdater performBatchUpdatesWithCollectionViewBlock:]` and `[IGListAdapterUpdater performReloadDataWithCollectionViewBlock:]` return early due to having a nil `UICollectionView`. Reviewed By: rnystrom Differential Revision: D8056539 fbshipit-source-id: 1af7b675ec6805c2d8031f32d8a4c8e8929564e6
- Loading branch information
1 parent
b4c8ea1
commit 290d592
Showing
3 changed files
with
133 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
290d592
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! Just a note here, we're still having a crash that seems very related to this (from its call stack) when checked out to this commit, but it crashes inside IGListBindingSectionController. Here's the call stack (top is later):
I'll verify later if I can create a minimal project that reproduces this, but the scenario is, the collection view has a list binding section controller (LBSC) which is being updated (
self.update
) and concurrently, the user does something that replaces this LBSC by another one which will also callself.update
.290d592
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @gobetti ! Please open an issue so we can track
290d592
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jessesquires I'm sorry for the delay! here it is: #1191