You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NSAssert(manager, @"%@ disconnected from its manager too early", self.class);
330
-
id <CK2FileManagerDelegate> delegate = manager.delegate;
331
330
332
-
if (!selector || [delegate respondsToSelector:selector]) // will crash if delegate is a zombie, as in https://rink.hockeyapp.net/manage/apps/101581/crash_reasons/21102964/multiple
333
-
{
334
-
[manager.delegateQueue addOperationWithBlock:^{
335
-
block(manager.delegate); // I have a suspicion delegate is occasionally a zombie otherwise https://karelia.fogbugz.com/f/cases/236528
336
-
}];
337
-
}
331
+
// Clients could change the delegate at any time. If we trust them to do so in concert with the
332
+
// delegate queue, then that can be made reasonably safe by only accessing the delegate from
333
+
// within the queue.
334
+
// It's still inherently a bit dangerous though, as the client could change it on a different
335
+
// queue, or could have specified a non-serial delegate queue.
336
+
[manager.delegateQueue addOperationWithBlock:^{
337
+
id <CK2FileManagerDelegate> delegate = manager.delegate;
338
+
if (!selector || [delegate respondsToSelector:selector]) {
0 commit comments