Index: test/cctest/heap/test-spaces.cc |
diff --git a/test/cctest/heap/test-spaces.cc b/test/cctest/heap/test-spaces.cc |
index 2fe099d2e3b19af8268f268c670e0df36247f507..0a1d76e4809e476d07d73e10c3106fdd7386f3e3 100644 |
--- a/test/cctest/heap/test-spaces.cc |
+++ b/test/cctest/heap/test-spaces.cc |
@@ -797,10 +797,10 @@ static HeapObject* AllocateUnaligned(NewSpace* space, int size) { |
return filler; |
} |
-class Observer : public InlineAllocationObserver { |
+class Observer : public AllocationObserver { |
public: |
- explicit Observer(intptr_t step_size) |
- : InlineAllocationObserver(step_size), count_(0) {} |
+ Observer(Heap* heap, intptr_t step_size) |
+ : AllocationObserver(heap, step_size), count_(0) {} |
void Step(int bytes_allocated, Address, size_t) override { count_++; } |
@@ -811,7 +811,7 @@ class Observer : public InlineAllocationObserver { |
}; |
-UNINITIALIZED_TEST(InlineAllocationObserver) { |
+UNINITIALIZED_TEST(AllocationObserver) { |
v8::Isolate::CreateParams create_params; |
create_params.array_buffer_allocator = CcTest::array_buffer_allocator(); |
v8::Isolate* isolate = v8::Isolate::New(create_params); |
@@ -824,7 +824,7 @@ UNINITIALIZED_TEST(InlineAllocationObserver) { |
NewSpace* new_space = i_isolate->heap()->new_space(); |
- Observer observer1(128); |
+ Observer observer1(i_isolate->heap(), 128); |
new_space->AddInlineAllocationObserver(&observer1); |
// The observer should not get notified if we have only allocated less than |
@@ -852,7 +852,7 @@ UNINITIALIZED_TEST(InlineAllocationObserver) { |
CHECK_EQ(observer1.count(), 19); |
// Multiple observers should work. |
- Observer observer2(96); |
+ Observer observer2(i_isolate->heap(), 96); |
new_space->AddInlineAllocationObserver(&observer2); |
AllocateUnaligned(new_space, 2048); |
@@ -907,9 +907,9 @@ UNINITIALIZED_TEST(InlineAllocationObserverCadence) { |
NewSpace* new_space = i_isolate->heap()->new_space(); |
- Observer observer1(512); |
+ Observer observer1(i_isolate->heap(), 512); |
new_space->AddInlineAllocationObserver(&observer1); |
- Observer observer2(576); |
+ Observer observer2(i_isolate->heap(), 576); |
new_space->AddInlineAllocationObserver(&observer2); |
for (int i = 0; i < 512; ++i) { |