Index: base/debug/thread_heap_usage_tracker_unittest.cc |
diff --git a/base/debug/thread_heap_usage_tracker_unittest.cc b/base/debug/thread_heap_usage_tracker_unittest.cc |
index 6aac4b594a3b57f663edfaeb8074b63cdc172890..5c03c3853ee8fdfca2f144d057a1439c3578308b 100644 |
--- a/base/debug/thread_heap_usage_tracker_unittest.cc |
+++ b/base/debug/thread_heap_usage_tracker_unittest.cc |
@@ -206,6 +206,9 @@ base::allocator::AllocatorDispatch ThreadHeapUsageTrackerTest::g_mock_dispatch = |
&ThreadHeapUsageTrackerTest::OnFreeFn, // free_function |
&ThreadHeapUsageTrackerTest:: |
OnGetSizeEstimateFn, // get_size_estimate_function |
+ nullptr, // batch_malloc |
+ nullptr, // batch_free |
+ nullptr, // free_definite_size_function |
nullptr, // next |
}; |
@@ -539,6 +542,10 @@ TEST_F(ThreadHeapUsageTrackerTest, AllShimFunctionsAreProvided) { |
#if BUILDFLAG(USE_EXPERIMENTAL_ALLOCATOR_SHIM) |
TEST(ThreadHeapUsageShimTest, HooksIntoMallocWhenShimAvailable) { |
+#if defined(OS_MACOSX) |
+ allocator::InitializeAllocatorShim(); |
+#endif |
+ |
ASSERT_FALSE(ThreadHeapUsageTracker::IsHeapTrackingEnabled()); |
ThreadHeapUsageTracker::EnableHeapTracking(); |