Files
react-native/Libraries/Core/setUpBatchedBridge.js
T
Wojteg1337 94029eee54 Add spec for HeapCapture (#24899)
Summary:
Part of #24875, adds a spec for HeapCapture

## Changelog

[General] [Added] - TM Spec for HeapCapture
Pull Request resolved: https://github.com/facebook/react-native/pull/24899

Reviewed By: fkgozali

Differential Revision: D15393464

Pulled By: RSNara

fbshipit-source-id: d8778285753ce8dbc87204ecfbddfa7339acd264
2019-05-22 13:10:25 -07:00

52 lines
1.7 KiB
JavaScript

/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict-local
* @format
*/
'use strict';
/**
* Set up the BatchedBridge. This must be done after the other steps in
* InitializeCore to ensure that the JS environment has been initialized.
* You can use this module directly, or just require InitializeCore.
*/
const BatchedBridge = require('../BatchedBridge/BatchedBridge');
BatchedBridge.registerLazyCallableModule('Systrace', () =>
require('../Performance/Systrace'),
);
BatchedBridge.registerLazyCallableModule('JSTimers', () =>
require('./Timers/JSTimers'),
);
BatchedBridge.registerLazyCallableModule('HeapCapture', () =>
require('../HeapCapture/HeapCapture'),
);
BatchedBridge.registerLazyCallableModule('SamplingProfiler', () =>
require('../Performance/SamplingProfiler'),
);
BatchedBridge.registerLazyCallableModule('RCTLog', () =>
require('../Utilities/RCTLog'),
);
BatchedBridge.registerLazyCallableModule('RCTDeviceEventEmitter', () =>
require('../EventEmitter/RCTDeviceEventEmitter'),
);
BatchedBridge.registerLazyCallableModule('RCTNativeAppEventEmitter', () =>
require('../EventEmitter/RCTNativeAppEventEmitter'),
);
BatchedBridge.registerLazyCallableModule('GlobalPerformanceLogger', () =>
require('../Utilities/GlobalPerformanceLogger'),
);
BatchedBridge.registerLazyCallableModule('JSDevSupportModule', () =>
require('../Utilities/JSDevSupportModule'),
);
if (__DEV__ && !global.__RCTProfileIsProfiling) {
BatchedBridge.registerCallableModule(
'HMRClient',
require('../Utilities/HMRClient'),
);
}