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

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

Issue 1269343002: Retire StringTracker. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 months 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/isolate.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-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);
« no previous file with comments | « src/isolate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698