mirror of
https://github.com/status-im/react-native.git
synced 2025-02-04 13:44:04 +00:00
nil out pendingCalls when we're done with them
Reviewed By: mmmulani Differential Revision: D3543825 fbshipit-source-id: cf2fcdb4e1536c00675fafa85d0f880313a80655
This commit is contained in:
parent
81f59dfdc2
commit
3816ced49b
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user