| Index: test/cctest/test-spaces.cc
|
| diff --git a/test/cctest/test-spaces.cc b/test/cctest/test-spaces.cc
|
| index accf9334ede1279aa098e36c6807feabc353dabe..6c3591a855abe4cb3f50c7e550c7276e85ffab85 100644
|
| --- a/test/cctest/test-spaces.cc
|
| +++ b/test/cctest/test-spaces.cc
|
| @@ -872,10 +872,24 @@ UNINITIALIZED_TEST(InlineAllocationObserver) {
|
| CHECK_EQ(observer1.count(), 20); // no more notifications.
|
| CHECK_EQ(observer2.count(), 3); // this one is still active.
|
|
|
| + // Ensure that Pause/ResumeInlineAllocationObservers work correctly.
|
| + AllocateUnaligned(new_space, 48);
|
| + CHECK_EQ(observer2.count(), 3);
|
| + new_space->PauseInlineAllocationObservers();
|
| + CHECK_EQ(observer2.count(), 3);
|
| + AllocateUnaligned(new_space, 384);
|
| + CHECK_EQ(observer2.count(), 3);
|
| + new_space->ResumeInlineAllocationObservers();
|
| + CHECK_EQ(observer2.count(), 3);
|
| + // Coupled with the 48 bytes allocated before the pause, another 48 bytes
|
| + // allocated here should trigger a notification.
|
| + AllocateUnaligned(new_space, 48);
|
| + CHECK_EQ(observer2.count(), 4);
|
| +
|
| new_space->RemoveInlineAllocationObserver(&observer2);
|
| AllocateUnaligned(new_space, 384);
|
| CHECK_EQ(observer1.count(), 20);
|
| - CHECK_EQ(observer2.count(), 3);
|
| + CHECK_EQ(observer2.count(), 4);
|
| }
|
| isolate->Dispose();
|
| }
|
|
|