Index: base/trace_event/malloc_dump_provider.cc |
diff --git a/base/trace_event/malloc_dump_provider.cc b/base/trace_event/malloc_dump_provider.cc |
index d8f82edfed52090195560dc1aa1dde2b656160f8..894f8264c3fb7872a213f176cbfb5ed8dc12de86 100644 |
--- a/base/trace_event/malloc_dump_provider.cc |
+++ b/base/trace_event/malloc_dump_provider.cc |
@@ -236,12 +236,12 @@ void MallocDumpProvider::InsertAllocation(void* address, size_t size) { |
auto tracker = AllocationContextTracker::GetInstanceForCurrentThread(); |
if (!tracker) |
return; |
- AllocationContext context = tracker->GetContextSnapshot(); |
AutoLock lock(allocation_register_lock_); |
if (!allocation_register_) |
return; |
+ AllocationContext context = tracker->GetContextSnapshot(); |
allocation_register_->Insert(address, size, context); |
} |