|
Ran
|
Files
59
|
Run time
1s
|
Badge
README BADGES
|
push
github
Replace IGFailAssert with NSLog for delegate recursion checks Summary: The delegate recursion protection code (for GitHub issue #1658) uses IGFailAssert to warn about invalid delegate configurations. However, IGFailAssert is defined as NSCAssert which throws exceptions in debug/test builds, preventing the recovery code from executing. This change replaces IGFailAssert with NSLog for these 4 specific cases where the code is designed to gracefully recover: 1. When setting collectionView and _scrollViewDelegate points to it 2. When setting collectionView and _collectionViewDelegate points to it 3. When calling setCollectionViewDelegate: with the collectionView itself 4. When calling setScrollViewDelegate: with the collectionView itself By using NSLog instead, the warning is still logged but execution continues, allowing the recovery code (clearing delegates or returning early) to run. This fixes 23 test failures in IGListKitTests where tests were either: - Intentionally testing the delegate protection behavior - Inadvertently triggering the assertion when swapping adapters/collection views Differential Revision: D101185192 fbshipit-source-id: 1f7cdc70b
4518 of 4578 relevant lines covered (98.69%)
701.2 hits per line
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|