Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2723)

Unified Diff: base/trace_event/malloc_dump_provider.cc

Issue 2637783002: [tracing] Don't register tracing-related allocations. (Closed)
Patch Set: Fix unittest Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 c09470befae184cd5dc38c87fc9e29d00d04c535..4683694d6bb60dc15a59b544dcadf639a7464e84 100644
--- a/base/trace_event/malloc_dump_provider.cc
+++ b/base/trace_event/malloc_dump_provider.cc
@@ -297,7 +297,10 @@ void MallocDumpProvider::InsertAllocation(void* address, size_t size) {
auto* tracker = AllocationContextTracker::GetInstanceForCurrentThread();
if (!tracker)
return;
- AllocationContext context = tracker->GetContextSnapshot();
+
+ AllocationContext context;
+ if (!tracker->GetContextSnapshot(&context))
+ return;
AutoLock lock(allocation_register_lock_);
if (!allocation_register_)

Powered by Google App Engine
This is Rietveld 408576698