nil out pendingCalls when we're done with them

Reviewed By: mmmulani

Differential Revision: D3543825

fbshipit-source-id: cf2fcdb4e1536c00675fafa85d0f880313a80655
This commit is contained in:
Pieter De Baets 2016-07-11 13:16:10 -07:00 коммит произвёл Facebook Github Bot 8
Родитель 81f59dfdc2
Коммит 3816ced49b
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -496,10 +496,14 @@ RCT_EXTERN NSArray<Class> *RCTGetModuleClasses(void);
RCTAssertJSThread();
[_performanceLogger markStopForTag:RCTPLBridgeStartup];
RCT_PROFILE_BEGIN_EVENT(0, @"Processing pendingCalls", @{ @"count": @(_pendingCalls.count) });
_loading = NO;
for (dispatch_block_t call in self->_pendingCalls) {
NSArray *pendingCalls = _pendingCalls;
_pendingCalls = nil;
for (dispatch_block_t call in pendingCalls) {
call();
}
RCT_PROFILE_END_EVENT(0, @"", nil);
}
- (void)stopLoadingWithError:(NSError *)error