diff --git a/react-packager/src/Resolver/polyfills/require.js b/react-packager/src/Resolver/polyfills/require.js index ebaa8c40..506d38e0 100644 --- a/react-packager/src/Resolver/polyfills/require.js +++ b/react-packager/src/Resolver/polyfills/require.js @@ -54,13 +54,13 @@ // require cycles inside the factory from causing an infinite require loop. mod.isInitialized = true; - __DEV__ && BridgeProfiling().profile('JS_require_' + id); + __DEV__ && Systrace().beginEvent('JS_require_' + id); // keep args in sync with with defineModuleCode in // packager/react-packager/src/Resolver/index.js mod.factory.call(global, global, require, mod.module, mod.module.exports); - __DEV__ && BridgeProfiling().profileEnd(); + __DEV__ && Systrace().endEvent(); } catch (e) { mod.hasError = true; mod.isInitialized = false; @@ -70,14 +70,14 @@ return mod.module.exports; } - const BridgeProfiling = __DEV__ && (() => { - var _BridgeProfiling; + const Systrace = __DEV__ && (() => { + var _Systrace; try { - _BridgeProfiling = require('BridgeProfiling'); + _Systrace = require('Systrace'); } catch(e) {} - return _BridgeProfiling && _BridgeProfiling.profile ? - _BridgeProfiling : { profile: () => {}, profileEnd: () => {} }; + return _Systrace && _Systrace.beginEvent ? + _Systrace : { beginEvent: () => {}, endEvent: () => {} }; }); global.__d = define;