Index: test/cctest/test-api.cc |
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc |
index ef98faf711c97807e8d899710a793c0f043a8d20..e0d450d31360636f7d518c0c9b13872e98137671 100644 |
--- a/test/cctest/test-api.cc |
+++ b/test/cctest/test-api.cc |
@@ -523,7 +523,7 @@ TEST(MakingExternalStringConditions) { |
String::NewFromTwoByte(env->GetIsolate(), two_byte_string); |
i::DeleteArray(two_byte_string); |
- // We should refuse to externalize newly created small string. |
+ // We should refuse to externalize small strings. |
CHECK(!small_string->CanMakeExternal()); |
// Trigger GCs so that the newly allocated string moves to old gen. |
CcTest::heap()->CollectGarbage(i::NEW_SPACE); // in survivor space now |
@@ -535,14 +535,6 @@ TEST(MakingExternalStringConditions) { |
small_string = String::NewFromTwoByte(env->GetIsolate(), two_byte_string); |
i::DeleteArray(two_byte_string); |
- // We should refuse externalizing newly created small string. |
- CHECK(!small_string->CanMakeExternal()); |
- for (int i = 0; i < 100; i++) { |
- String::Value value(small_string); |
- } |
- // Frequently used strings should be accepted. |
- CHECK(small_string->CanMakeExternal()); |
- |
const int buf_size = 10 * 1024; |
char* buf = i::NewArray<char>(buf_size); |
memset(buf, 'a', buf_size); |
@@ -567,7 +559,7 @@ TEST(MakingExternalOneByteStringConditions) { |
CcTest::heap()->CollectGarbage(i::NEW_SPACE); |
Local<String> small_string = String::NewFromUtf8(env->GetIsolate(), "s1"); |
- // We should refuse to externalize newly created small string. |
+ // We should refuse to externalize small strings. |
CHECK(!small_string->CanMakeExternal()); |
// Trigger GCs so that the newly allocated string moves to old gen. |
CcTest::heap()->CollectGarbage(i::NEW_SPACE); // in survivor space now |
@@ -575,15 +567,6 @@ TEST(MakingExternalOneByteStringConditions) { |
// Old space strings should be accepted. |
CHECK(small_string->CanMakeExternal()); |
- small_string = String::NewFromUtf8(env->GetIsolate(), "small string 2"); |
- // We should refuse externalizing newly created small string. |
- CHECK(!small_string->CanMakeExternal()); |
- for (int i = 0; i < 100; i++) { |
- String::Value value(small_string); |
- } |
- // Frequently used strings should be accepted. |
- CHECK(small_string->CanMakeExternal()); |
- |
const int buf_size = 10 * 1024; |
char* buf = i::NewArray<char>(buf_size); |
memset(buf, 'a', buf_size); |