mirror of
https://github.com/Instagram/IGListKit
synced 2026-05-23 09:18:29 +00:00
Copy and nil block queue before executing #trivial
Summary:
Discovered in rnystrom/GitHawk#781 and introduced in d9a89c9b00. Can't repro in unit test, but have obvious stack traces (see GitHawk issue) that collection is being mutated while enumerated.
No changelog since this is a new fix for 3.2.
Closes https://github.com/Instagram/IGListKit/pull/995
Reviewed By: manicakes
Differential Revision: D6206957
Pulled By: rnystrom
fbshipit-source-id: c42e3688d0f2b31693199f8015b5de48b7b3b9e6
This commit is contained in:
parent
a6f264fc12
commit
8cffc50d7d
1 changed files with 3 additions and 2 deletions
|
|
@ -749,10 +749,11 @@
|
|||
}
|
||||
|
||||
- (void)exitBatchUpdates {
|
||||
for (void (^block)(void) in _queuedCompletionBlocks) {
|
||||
NSArray *blocks = [_queuedCompletionBlocks copy];
|
||||
_queuedCompletionBlocks = nil;
|
||||
for (void (^block)(void) in blocks) {
|
||||
block();
|
||||
}
|
||||
_queuedCompletionBlocks = nil;
|
||||
}
|
||||
|
||||
#pragma mark - UIScrollViewDelegate
|
||||
|
|
|
|||
Loading…
Reference in a new issue