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

Unified Diff: test/cctest/test-spaces.cc

Issue 1465223009: [heap] pause observers during mark-compact (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: use a scope for pausing/resuming inline allocation observers Created 5 years 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 | « src/heap/spaces.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-spaces.cc
diff --git a/test/cctest/test-spaces.cc b/test/cctest/test-spaces.cc
index d8a4b02b330b44b0c2ed0c7f95b937ad34bec41a..4a658235193dbc7de64c36b9030c0e03bc97daed 100644
--- a/test/cctest/test-spaces.cc
+++ b/test/cctest/test-spaces.cc
@@ -872,14 +872,15 @@ 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.
+ // Ensure that PauseInlineAllocationObserversScope 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();
+ {
+ PauseInlineAllocationObserversScope pause_observers(new_space);
+ CHECK_EQ(observer2.count(), 3);
+ AllocateUnaligned(new_space, 384);
+ CHECK_EQ(observer2.count(), 3);
+ }
CHECK_EQ(observer2.count(), 3);
// Coupled with the 48 bytes allocated before the pause, another 48 bytes
// allocated here should trigger a notification.
« no previous file with comments | « src/heap/spaces.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698