| Index: test/cctest/test-api.cc
|
| diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
|
| index 2e8d4ae94ec1a7a481278a8d8c437f6b460141e4..fdbb694bd4718aab28537fb86ac0e3c11318da51 100644
|
| --- a/test/cctest/test-api.cc
|
| +++ b/test/cctest/test-api.cc
|
| @@ -490,8 +490,7 @@ THREADED_TEST(ScriptUsingStringResource) {
|
| CcTest::heap()->CollectAllGarbage(i::Heap::kNoGCFlags);
|
| CHECK_EQ(0, dispose_count);
|
| }
|
| - CcTest::i_isolate()->compilation_cache()->Clear();
|
| - CcTest::heap()->CollectAllAvailableGarbage();
|
| + CcTest::heap()->CollectAllAvailableGarbage("test external string", 1);
|
| CHECK_EQ(1, dispose_count);
|
| }
|
|
|
| @@ -519,8 +518,7 @@ THREADED_TEST(ScriptUsingOneByteStringResource) {
|
| CcTest::heap()->CollectAllGarbage(i::Heap::kNoGCFlags);
|
| CHECK_EQ(0, dispose_count);
|
| }
|
| - CcTest::i_isolate()->compilation_cache()->Clear();
|
| - CcTest::heap()->CollectAllAvailableGarbage();
|
| + CcTest::heap()->CollectAllAvailableGarbage("test external string", 1);
|
| CHECK_EQ(1, dispose_count);
|
| }
|
|
|
| @@ -874,8 +872,7 @@ TEST(ExternalStringWithDisposeHandling) {
|
| CcTest::heap()->CollectAllAvailableGarbage();
|
| CHECK_EQ(0, TestOneByteResourceWithDisposeControl::dispose_count);
|
| }
|
| - CcTest::i_isolate()->compilation_cache()->Clear();
|
| - CcTest::heap()->CollectAllAvailableGarbage();
|
| + CcTest::heap()->CollectAllAvailableGarbage("test external string", 1);
|
| CHECK_EQ(1, TestOneByteResourceWithDisposeControl::dispose_calls);
|
| CHECK_EQ(0, TestOneByteResourceWithDisposeControl::dispose_count);
|
|
|
| @@ -895,8 +892,7 @@ TEST(ExternalStringWithDisposeHandling) {
|
| CcTest::heap()->CollectAllAvailableGarbage();
|
| CHECK_EQ(0, TestOneByteResourceWithDisposeControl::dispose_count);
|
| }
|
| - CcTest::i_isolate()->compilation_cache()->Clear();
|
| - CcTest::heap()->CollectAllAvailableGarbage();
|
| + CcTest::heap()->CollectAllAvailableGarbage("test external string", 1);
|
| CHECK_EQ(1, TestOneByteResourceWithDisposeControl::dispose_calls);
|
| CHECK_EQ(1, TestOneByteResourceWithDisposeControl::dispose_count);
|
| }
|
| @@ -18739,8 +18735,7 @@ TEST(ExternalInternalizedStringCollectedAtGC) {
|
| }
|
|
|
| // Garbage collector deals swift blows to evil.
|
| - CcTest::i_isolate()->compilation_cache()->Clear();
|
| - CcTest::heap()->CollectAllAvailableGarbage();
|
| + CcTest::heap()->CollectAllAvailableGarbage("Swift blow to evil", 1);
|
|
|
| // Ring has been destroyed. Free Peoples of Middle-earth Rejoice.
|
| CHECK_EQ(1, destroyed);
|
|
|