Index: base/trace_event/heap_profiler_allocation_context_tracker_unittest.cc |
diff --git a/base/trace_event/heap_profiler_allocation_context_tracker_unittest.cc b/base/trace_event/heap_profiler_allocation_context_tracker_unittest.cc |
index 2498fcd30c913463c3899e8b075481bd60148dbc..58255ad788ae3d4538db0dd97931c27d17877470 100644 |
--- a/base/trace_event/heap_profiler_allocation_context_tracker_unittest.cc |
+++ b/base/trace_event/heap_profiler_allocation_context_tracker_unittest.cc |
@@ -27,9 +27,7 @@ |
// in |AllocationContextTracker::GetContextSnapshot|. |
template <size_t N> |
void AssertBacktraceEquals(const StackFrame(&expected_backtrace)[N]) { |
- AllocationContext ctx = |
- AllocationContextTracker::GetInstanceForCurrentThread() |
- ->GetContextSnapshot(); |
+ AllocationContext ctx = AllocationContextTracker::GetContextSnapshot(); |
auto actual = std::begin(ctx.backtrace.frames); |
auto actual_bottom = std::end(ctx.backtrace.frames); |
@@ -48,9 +46,7 @@ |
} |
void AssertBacktraceEmpty() { |
- AllocationContext ctx = |
- AllocationContextTracker::GetInstanceForCurrentThread() |
- ->GetContextSnapshot(); |
+ AllocationContext ctx = AllocationContextTracker::GetContextSnapshot(); |
for (StackFrame frame : ctx.backtrace.frames) |
ASSERT_EQ(nullptr, frame); |
@@ -211,9 +207,7 @@ |
{ |
TRACE_EVENT0("Testing", kGingerbread); |
- AllocationContext ctx = |
- AllocationContextTracker::GetInstanceForCurrentThread() |
- ->GetContextSnapshot(); |
+ AllocationContext ctx = AllocationContextTracker::GetContextSnapshot(); |
// The pseudo stack relies on pointer equality, not deep string comparisons. |
ASSERT_EQ(kCupcake, ctx.backtrace.frames[0]); |
@@ -221,9 +215,7 @@ |
} |
{ |
- AllocationContext ctx = |
- AllocationContextTracker::GetInstanceForCurrentThread() |
- ->GetContextSnapshot(); |
+ AllocationContext ctx = AllocationContextTracker::GetContextSnapshot(); |
ASSERT_EQ(kCupcake, ctx.backtrace.frames[0]); |
ASSERT_EQ(kFroyo, ctx.backtrace.frames[11]); |
} |