Index: test/cctest/test-dictionary.cc |
diff --git a/test/cctest/test-dictionary.cc b/test/cctest/test-dictionary.cc |
index 44f64f788101cf8d8aa289ac3c81eed134b6934f..007aa61b578b90db955f590e606ab52b39752c04 100644 |
--- a/test/cctest/test-dictionary.cc |
+++ b/test/cctest/test-dictionary.cc |
@@ -175,13 +175,17 @@ TEST(ObjectHashSetCausesGC) { |
SimulateFullSpace(CcTest::heap()->old_pointer_space()); |
// Calling Contains() should not cause GC ever. |
- CHECK(!table->Contains(*key)); |
+ int gc_count = isolate->heap()->gc_count(); |
rafaelw
2013/10/29 19:14:51
I just took a guess at how to address this test.
Michael Starzinger
2013/11/04 10:29:11
Yes, I think using the GC-count makes sense.
|
+ CHECK(!ObjectHashSet::Contains(table, key)); |
+ CHECK(gc_count == isolate->heap()->gc_count()); |
// Calling Remove() should not cause GC ever. |
rafaelw
2013/10/29 19:14:51
This comment doesn't seem true. I believe it's alw
Michael Starzinger
2013/11/04 10:29:11
You are right, the comment only holds for a HashSe
rafaelw
2013/11/04 15:12:01
Done.
|
- CHECK(!table->Remove(*key)->IsFailure()); |
+ table = ObjectHashSet::Remove(table, key); |
+ CHECK(gc_count == isolate->heap()->gc_count()); |
- // Calling Add() should request GC by returning a failure. |
- CHECK(table->Add(*key)->IsRetryAfterGC()); |
+ // Calling Add() should cause GC. |
+ table = ObjectHashSet::Add(table, key); |
+ CHECK(gc_count < isolate->heap()->gc_count()); |
} |
#endif |