Avoid crashing when executor is invalidated before it finishes loading RA Bundle
Reviewed By: alexeylang Differential Revision: D3150719 fb-gh-sync-id: 46e516757e110e985980056f2a8b6eaa22e522b0 fbshipit-source-id: 46e516757e110e985980056f2a8b6eaa22e522b0
This commit is contained in:
parent
7b3a371ef1
commit
648aaf440b
|
@ -380,11 +380,6 @@ static void RCTInstallJSCProfiler(RCTBridge *bridge, JSContextRef context)
|
|||
|
||||
_valid = NO;
|
||||
|
||||
if (_jsModules) {
|
||||
CFRelease(_jsModules);
|
||||
fclose(_bundle);
|
||||
}
|
||||
|
||||
#if RCT_DEV
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
#endif
|
||||
|
@ -399,6 +394,11 @@ static void RCTInstallJSCProfiler(RCTBridge *bridge, JSContextRef context)
|
|||
withObject:nil
|
||||
waitUntilDone:NO];
|
||||
_context = nil;
|
||||
|
||||
if (_jsModules) {
|
||||
CFRelease(_jsModules);
|
||||
fclose(_bundle);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)flushedQueue:(RCTJavaScriptCallback)onComplete
|
||||
|
|
Loading…
Reference in New Issue