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:
Mart?n Bigio 2016-04-08 07:33:14 -07:00 committed by Facebook Github Bot 8
parent 7b3a371ef1
commit 648aaf440b
1 changed files with 5 additions and 5 deletions

View File

@ -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