Invalidate JS executor when loading fails
Summary:
This solves https://github.com/facebook/react-native/issues/5090. Since 5b4e873c68
we had better reporting for when calls from native to JS fail. When trying to load an invalid bundle, this would now cause a stackoverflow, since RCTFatal would schedule a JS call to log, which would RCTFatal, which would ...
By invalidating the jsExecutor immediately after loading fails, we prevent any more attempts to log. We can't invalidate the whole bridge at this point since we still need the redbox module to actually display the error.
public
Reviewed By: majak
Differential Revision: D2834251
fb-gh-sync-id: a3e2ad425e40560beae4d3eacb93f66ace5341bf
This commit is contained in:
parent
58a448ece3
commit
8ea9a1bc94
|
@ -482,6 +482,7 @@ RCT_EXTERN NSArray<Class> *RCTGetModuleClasses(void);
|
|||
}
|
||||
|
||||
_loading = NO;
|
||||
[_javaScriptExecutor invalidate];
|
||||
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
postNotificationName:RCTJavaScriptDidFailToLoadNotification
|
||||
|
|
Loading…
Reference in New Issue