| Index: base/trace_event/trace_event.h
|
| diff --git a/base/trace_event/trace_event.h b/base/trace_event/trace_event.h
|
| index ef452f642f2ee7f419d0f213a77180a05accbc7d..542537d7ed96ebf24c2f6d2ad409519404bacdc6 100644
|
| --- a/base/trace_event/trace_event.h
|
| +++ b/base/trace_event/trace_event.h
|
| @@ -1056,17 +1056,21 @@ class ScopedTaskExecutionEvent {
|
| public:
|
| explicit ScopedTaskExecutionEvent(const char* task_context)
|
| : context_(task_context) {
|
| + using base::trace_event::AllocationContextTracker;
|
| if (UNLIKELY(
|
| - base::trace_event::AllocationContextTracker::capture_enabled())) {
|
| - base::trace_event::AllocationContextTracker::GetInstanceForCurrentThread()
|
| + AllocationContextTracker::capture_mode() !=
|
| + AllocationContextTracker::CaptureMode::DISABLED)) {
|
| + AllocationContextTracker::GetInstanceForCurrentThread()
|
| ->PushCurrentTaskContext(context_);
|
| }
|
| }
|
|
|
| ~ScopedTaskExecutionEvent() {
|
| + using base::trace_event::AllocationContextTracker;
|
| if (UNLIKELY(
|
| - base::trace_event::AllocationContextTracker::capture_enabled())) {
|
| - base::trace_event::AllocationContextTracker::GetInstanceForCurrentThread()
|
| + AllocationContextTracker::capture_mode() !=
|
| + AllocationContextTracker::CaptureMode::DISABLED)) {
|
| + AllocationContextTracker::GetInstanceForCurrentThread()
|
| ->PopCurrentTaskContext(context_);
|
| }
|
| }
|
|
|