mirror of
https://github.com/status-im/react-native.git
synced 2025-01-27 09:45:04 +00:00
[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:
parent
648cdfeb18
commit
261a0af9bb
@ -79,6 +79,12 @@ function setupRedBoxErrorHandler() {
|
|||||||
ErrorUtils.setGlobalHandler(handleErrorWithRedBox);
|
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
|
* Sets up a set of window environment wrappers that ensure that the
|
||||||
* BatchedBridge is flushed after each tick. In both the case of the
|
* BatchedBridge is flushed after each tick. In both the case of the
|
||||||
@ -139,4 +145,5 @@ setupTimers();
|
|||||||
setupAlert();
|
setupAlert();
|
||||||
setupPromise();
|
setupPromise();
|
||||||
setupXHR();
|
setupXHR();
|
||||||
|
setupRedBoxConsoleErrorHandler();
|
||||||
setupGeolocation();
|
setupGeolocation();
|
||||||
|
@ -11,8 +11,6 @@
|
|||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
require('ExceptionsManager').installConsoleErrorReporter();
|
|
||||||
|
|
||||||
var React = require('React');
|
var React = require('React');
|
||||||
var StyleSheet = require('StyleSheet');
|
var StyleSheet = require('StyleSheet');
|
||||||
var View = require('View');
|
var View = require('View');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user