Index: test/cctest/heap/test-heap.cc |
diff --git a/test/cctest/heap/test-heap.cc b/test/cctest/heap/test-heap.cc |
index 73770a7e3b438edc125fc590804f7589d4ba0dd4..769b64af899a0d735eccfbc4a88486559dd67d4b 100644 |
--- a/test/cctest/heap/test-heap.cc |
+++ b/test/cctest/heap/test-heap.cc |
@@ -1619,7 +1619,6 @@ TEST(TestUseOfIncrementalBarrierOnCompileLazy) { |
TEST(CompilationCacheCachingBehavior) { |
// If we do not flush code, or have the compilation cache turned off, this |
// test is invalid. |
- i::FLAG_allow_natives_syntax = true; |
if (!FLAG_flush_code || !FLAG_compilation_cache) { |
return; |
} |
@@ -1663,13 +1662,17 @@ TEST(CompilationCacheCachingBehavior) { |
} |
// Progress code age until it's old and ready for GC. |
- while (!info.ToHandleChecked()->code()->IsOld()) { |
+ const int kAgingThreshold = 6; |
+ for (int i = 0; i < kAgingThreshold; i++) { |
// To guarantee progress, we have to MakeOlder with different parities. |
// We can't just use NO_MARKING_PARITY, since e.g. kExecutedOnceCodeAge is |
// always NO_MARKING_PARITY and the code age only progresses if the parity |
// is different. |
info.ToHandleChecked()->code()->MakeOlder(ODD_MARKING_PARITY); |
info.ToHandleChecked()->code()->MakeOlder(EVEN_MARKING_PARITY); |
+ if (info.ToHandleChecked()->HasBytecodeArray()) { |
+ info.ToHandleChecked()->bytecode_array()->MakeOlder(); |
+ } |
} |
CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); |