Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add native function to determine if systrace is enabled
Summary: We're currently using `global.__RCTProfileIsProfiling` to determine if the app is currently profiling to forward calls to Systrace to native. We're defining `global.__RCTProfileIsProfiling` when the React Native runtime is initialized (which, in most cases, is on startup or shortly after startup), which means that enabling profiling in the middle of the session doesn't set this value to `true`. This diff adds a new method (in the global scope for now, as the rest of bindings for Systrace) to check if we're profiling in real time. This call should be very cheap as it's implemented as a JSI function that calls into a C++ API directly. Changelog: [internal] Reviewed By: rshest Differential Revision: D40095840 fbshipit-source-id: e7030d6370ecb43d56478b03cb63806ffa0cd0cf
- Loading branch information