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

Unified Diff: third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.cpp

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: third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.cpp
diff --git a/third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.cpp b/third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.cpp
index 5b66c0b7c35b54614a22b720c0e92f03e1d7bace..b189b629ce84c39e3d4cd72da30c077858b77c32 100644
--- a/third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.cpp
+++ b/third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.cpp
@@ -200,9 +200,12 @@ void PartitionAllocMemoryDumpProvider::OnHeapProfilingEnabled(bool enabled) {
void PartitionAllocMemoryDumpProvider::insert(void* address,
size_t size,
const char* typeName) {
- base::trace_event::AllocationContext context =
- base::trace_event::AllocationContextTracker::GetInstanceForCurrentThread()
- ->GetContextSnapshot();
+ base::trace_event::AllocationContext context;
+ if (!base::trace_event::AllocationContextTracker::
+ GetInstanceForCurrentThread()
+ ->GetContextSnapshot(&context))
+ return;
+
context.type_name = typeName;
MutexLocker locker(m_allocationRegisterMutex);
if (m_allocationRegister)
« no previous file with comments | « base/trace_event/malloc_dump_provider.cc ('k') | third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698