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

Unified Diff: base/debug/thread_heap_usage_tracker_unittest.cc

Issue 2658723007: Hook up allocator shim on mac. (Closed)
Patch Set: remove a debugging test. 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
« no previous file with comments | « base/debug/thread_heap_usage_tracker.cc ('k') | base/trace_event/malloc_dump_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « base/debug/thread_heap_usage_tracker.cc ('k') | base/trace_event/malloc_dump_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698