Fix JS deallocation on load errors
Summary:Fixes #6281 The JS executor is invalidated from `[RCTBatchedBridger stopLoadingWithError:]` which prevented another blocks that depended on the executor to run in the bridge invalidation. Reviewed By: javache Differential Revision: D3018299 fb-gh-sync-id: 4f482b9b697bfabd24b405398d25c72b9e1a3c84 shipit-source-id: 4f482b9b697bfabd24b405398d25c72b9e1a3c84
This commit is contained in:
parent
006907bdaa
commit
24c458aa08
|
@ -388,6 +388,11 @@ static void RCTInstallJSCProfiler(RCTBridge *bridge, JSContextRef context)
|
|||
#if RCT_DEV
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
#endif
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[self invalidate];
|
||||
|
||||
[_context performSelector:@selector(invalidate)
|
||||
onThread:_javaScriptThread
|
||||
|
@ -396,11 +401,6 @@ static void RCTInstallJSCProfiler(RCTBridge *bridge, JSContextRef context)
|
|||
_context = nil;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[self invalidate];
|
||||
}
|
||||
|
||||
- (void)flushedQueue:(RCTJavaScriptCallback)onComplete
|
||||
{
|
||||
// TODO: Make this function handle first class instead of dynamically dispatching it. #9317773
|
||||
|
|
Loading…
Reference in New Issue