Bug 1738627 - profiler_thread_is_being_profiled's ThreadProfilingFeatures is now compulsory - r=canaltinova

Now that most calls to `profiler_thread_is_being_profiled` have been updated, the `ThreadProfilingFeatures` can be made compulsory, to force callers to think about what they really want to know about the current profiling state.

Differential Revision: https://phabricator.services.mozilla.com/D130010
This commit is contained in:
Gerald Squelart 2021-11-08 23:59:36 +00:00
Родитель 5399574d8b
Коммит 2a8eb1038b
2 изменённых файлов: 3 добавлений и 5 удалений

Просмотреть файл

@ -66,7 +66,7 @@ bool is_in_render_thread() {
}
bool gecko_profiler_thread_is_being_profiled() {
return profiler_thread_is_being_profiled();
return profiler_thread_is_being_profiled(ThreadProfilingFeatures::Any);
}
bool is_glcontext_gles(void* const glcontext_ptr) {

Просмотреть файл

@ -26,8 +26,7 @@
// profiled for any of the given features? (Same caveats and recommended usage
// as profiler_is_active().)
[[nodiscard]] inline bool profiler_thread_is_being_profiled(
ThreadProfilingFeatures aThreadProfilingFeatures =
ThreadProfilingFeatures::Any) {
ThreadProfilingFeatures aThreadProfilingFeatures) {
return profiler_is_active_and_unpaused() &&
mozilla::profiler::ThreadRegistration::WithOnThreadRefOr(
[aThreadProfilingFeatures](
@ -45,8 +44,7 @@
// as current thread id).
[[nodiscard]] inline bool profiler_thread_is_being_profiled(
const ProfilerThreadId& aThreadId,
ThreadProfilingFeatures aThreadProfilingFeatures =
ThreadProfilingFeatures::Any) {
ThreadProfilingFeatures aThreadProfilingFeatures) {
if (!profiler_is_active_and_unpaused()) {
return false;
}