mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Improve thread-safety of ASDisplayNode's didExitHierarchy #trivial (#916)
Since `didExitHierarchy` is called without the node's instance lock being held, the lock must be acquired before accessing `pendingInterfaceState`.
This commit is contained in:
@@ -3016,7 +3016,7 @@ ASDISPLAYNODE_INLINE BOOL subtreeIsRasterized(ASDisplayNode *node) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
if (ASInterfaceStateIncludesVisible(_pendingInterfaceState)) {
|
||||
if (ASInterfaceStateIncludesVisible(self.pendingInterfaceState)) {
|
||||
void(^exitVisibleInterfaceState)(void) = ^{
|
||||
// This block intentionally retains self.
|
||||
__instanceLock__.lock();
|
||||
|
||||
Reference in New Issue
Block a user