|
Ran
|
Files
59
|
Run time
2s
|
Badge
README BADGES
|
push
github
Formalize that the IGListAdapterDelegateAnnouncer is main-thread affined Summary: Today, the IGListAdapterDelegateAnnouncer is different than most other announcers in IG/FB/etc in that it not thread safe to add and remove listeners. However, this isn't really enforced, and has lead to people calling add / remove on background threads, which is creating crashes: https://fburl.com/logview/f1x4ytdl A different way to deal with this problem is to make the IGListAdapterDelegateAnnouncer thread safe (eg D87806041), but the principle there seems to be that this class is only intended to be dealt with on the main threasd. So, the fix here is to just make sure we call this on the thread and add asserts. using on_main here guarantees that we don't dispatch if we are already on the main thread, so it should be safe to add. Reviewed By: manicakes Differential Revision: D88427711 fbshipit-source-id: 41f352495
4357 of 4549 relevant lines covered (95.78%)
694.06 hits per line
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|