Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1877380 - Use AtomicU32::from_ptr implementation instead of a ref…
…erence for RacyFeatures_sActiveAndFeatures r=aabh,profiler-reviewers,glandium This variable is an atomic variable here: https://searchfox.org/mozilla-central/rev/2a867dd1ab015c3ef24b774a57709fb3b3dc4961/tools/profiler/core/platform.cpp#1631 We are getting this C++ atomic variable here directly instead of using FFIs because this is much faster and this function has to be as fast as possible (because it will be used before adding each marker to make sure the profiler is running.). It's used by `is_active` and `can_accept_markers` functions above this file. It looks like Rust 1.77 starts to give some warnings/errors for these cases where we have shared references. This should be safe for us, because we already know that this function can be racy. So this is something we considered and decided that it's better to be faster. Differential Revision: https://phabricator.services.mozilla.com/D199968
- Loading branch information