зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
5399574d8b
Коммит
2a8eb1038b
|
@ -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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче