[react-native] Fix Chrome debugging

Summary:
Requiring ExceptionsManager in renderApplication (added in D2023119) led to a transitive require of ExecutionEnvironment, which has to run after InitializeJavaScriptAppEngine.

InitializeJavaScriptAppEngine is the right place for this sort of logic because we control the order that things are loaded, so move the console.error hook initialization there.

@public

Test Plan: Loaded shell app in simulator with Chrome debugging with no errors.
This commit is contained in:
Ben Alpert committed 2015-04-30 02:16:40 -08:00
1 parent 648cdfeb18
commit 261a0af9bb
2 files changed
+7 -2

No files matched your search

@@ -79,6 +79,12 @@ function setupRedBoxErrorHandler() {
ErrorUtils.setGlobalHandler(handleErrorWithRedBox);
}
function setupRedBoxConsoleErrorHandler() {
// ExceptionsManager transitively requires Promise so we install it after
var ExceptionsManager = require('ExceptionsManager');
ExceptionsManager.installConsoleErrorReporter();
}
/**
* Sets up a set of window environment wrappers that ensure that the
* BatchedBridge is flushed after each tick. In both the case of the
@@ -139,4 +145,5 @@ setupTimers();
setupAlert();
setupPromise();
setupXHR();
setupRedBoxConsoleErrorHandler();
setupGeolocation();