Move BatchedBridge module configuration to InitializeCore
Reviewed By: davidaurelio Differential Revision: D4599060 fbshipit-source-id: bd0f1f6910f4fd9b68d6a9678fd5e97cdf6be553
This commit is contained in:
parent
a6adc501e8
commit
68135d90a4
|
@ -14,16 +14,6 @@
|
|||
const MessageQueue = require('MessageQueue');
|
||||
const BatchedBridge = new MessageQueue();
|
||||
|
||||
// TODO: Move these around to solve the cycle in a cleaner way.
|
||||
BatchedBridge.registerCallableModule('Systrace', require('Systrace'));
|
||||
BatchedBridge.registerCallableModule('JSTimersExecution', require('JSTimersExecution'));
|
||||
BatchedBridge.registerCallableModule('HeapCapture', require('HeapCapture'));
|
||||
BatchedBridge.registerCallableModule('SamplingProfiler', require('SamplingProfiler'));
|
||||
|
||||
if (__DEV__) {
|
||||
BatchedBridge.registerCallableModule('HMRClient', require('HMRClient'));
|
||||
}
|
||||
|
||||
// Wire up the batched bridge on the global object so that we can call into it.
|
||||
// Ideally, this would be the inverse relationship. I.e. the native environment
|
||||
// provides this global directly with its script embedded. Then this module
|
||||
|
|
|
@ -104,6 +104,17 @@ Systrace.setEnabled(global.__RCTProfileIsProfiling || false);
|
|||
const ExceptionsManager = require('ExceptionsManager');
|
||||
ExceptionsManager.installConsoleErrorReporter();
|
||||
|
||||
// TODO: Move these around to solve the cycle in a cleaner way
|
||||
const BatchedBridge = require('BatchedBridge');
|
||||
BatchedBridge.registerCallableModule('Systrace', require('Systrace'));
|
||||
BatchedBridge.registerCallableModule('JSTimersExecution', require('JSTimersExecution'));
|
||||
BatchedBridge.registerCallableModule('HeapCapture', require('HeapCapture'));
|
||||
BatchedBridge.registerCallableModule('SamplingProfiler', require('SamplingProfiler'));
|
||||
|
||||
if (__DEV__) {
|
||||
BatchedBridge.registerCallableModule('HMRClient', require('HMRClient'));
|
||||
}
|
||||
|
||||
// RCTLog needs to register with BatchedBridge
|
||||
require('RCTLog');
|
||||
|
||||
|
|
Loading…
Reference in New Issue