Permalink
Browse files

Move BatchedBridge module configuration to InitializeCore

Reviewed By: davidaurelio

Differential Revision: D4599060

fbshipit-source-id: bd0f1f6910f4fd9b68d6a9678fd5e97cdf6be553
  • Loading branch information...
javache authored and facebook-github-bot committed Feb 22, 2017
1 parent a6adc50 commit 68135d90a41ac8288685884eda675823461b3d24
Showing with 11 additions and 10 deletions.
  1. +0 −10 Libraries/BatchedBridge/BatchedBridge.js
  2. +11 −0 Libraries/Core/InitializeCore.js
@@ -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');

0 comments on commit 68135d9

Please sign in to comment.