react-native-macos/React
James Ide 3f4c7e40c6 [Bridge] Consistently post "DidFailToLoad" notification when there's an error
Summary:
Previously the bridge sometimes never fired RCTJavaScriptDidLoadNotification or RCTJavaScriptDidFailToLoadNotification if there was an error (for example, if the source code loaded but we couldn't inject the JSON config). This diff moves the error handling into a method called `stopLoadingWithError` that the bridge can call whenever there is an error.

Also if the script failed to load, the BatchedBridge still called `executeSourceCode`. With this diff the `_loading` flag is set to NO when the script fails to load, and `executeSourceCode` returns immediately when `_loading` is false. This way the bridge does not try to execute JS when there is a loading error.
Closes https://github.com/facebook/react-native/pull/2520
Github Author: James Ide <ide@jameside.com>
2015-09-04 03:28:51 -08:00
..
Base [Bridge] Consistently post "DidFailToLoad" notification when there's an error 2015-09-04 03:28:51 -08:00
Executors [ReactNative] Ensure WebViewExecutor's webview is created on the main thread 2015-09-01 05:16:43 -08:00
Layout [React Native] Fix infinite loop in css-layout 2015-08-19 16:39:35 -07:00
Modules Send layout events on shadow queue 2015-09-03 03:42:26 -08:00
React.xcodeproj Added mechanism for directly mapping JS event handlers to blocks 2015-09-02 06:11:24 -08:00
Views Added mechanism for directly mapping JS event handlers to blocks 2015-09-02 06:11:24 -08:00