mirror of
https://github.com/status-im/react-native.git
synced 2025-01-27 17:54:48 +00:00
Use nativeTrace(Begin|End)Section directly from BridgeProfiling
Summary: public Call the native bindings explicitly from BridgeProfiling instead of polyfill'ing `console.profile` with a function that has a different signature. Reviewed By: vjeux Differential Revision: D2602313 fb-gh-sync-id: 9295eff9458f2caa35b7e982c0f7c06dbe65fd09
This commit is contained in:
parent
7ae39f83ac
commit
d33e84dde5
@ -159,8 +159,6 @@ function setUpWebSockets() {
|
||||
}
|
||||
|
||||
function setUpProfile() {
|
||||
console.profile = console.profile || GLOBAL.nativeTraceBeginSection || function () {};
|
||||
console.profileEnd = console.profileEnd || GLOBAL.nativeTraceEndSection || function () {};
|
||||
if (__DEV__) {
|
||||
require('BridgeProfiling').swizzleReactPerf();
|
||||
}
|
||||
|
@ -34,13 +34,13 @@ var BridgeProfiling = {
|
||||
if (_enabled) {
|
||||
profileName = typeof profileName === 'function' ?
|
||||
profileName() : profileName;
|
||||
console.profile(TRACE_TAG_REACT_APPS, profileName);
|
||||
global.nativeTraceBeginSection(TRACE_TAG_REACT_APPS, profileName);
|
||||
}
|
||||
},
|
||||
|
||||
profileEnd() {
|
||||
if (_enabled) {
|
||||
console.profileEnd(TRACE_TAG_REACT_APPS);
|
||||
global.nativeTraceEndSection(TRACE_TAG_REACT_APPS);
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user