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

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

Issue 8635011: Introduce short external strings without pointer cache. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 1 month 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
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index 5e76de71bb9ba11fd5ea03b0da98e6f6d34891b2..1416d7d74bcc471ba0eece12bf11397b9ee725b1 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -491,7 +491,7 @@ TEST(MakingExternalStringConditions) {
HEAP->CollectGarbage(i::NEW_SPACE);
HEAP->CollectGarbage(i::NEW_SPACE);
- uint16_t* two_byte_string = AsciiToTwoByteString("abcdefghi");
+ uint16_t* two_byte_string = AsciiToTwoByteString("small");
Lasse Reichstein 2011/11/23 08:43:20 Whether the externalized version of this string is
Yang 2011/11/23 09:58:48 I changed the string lengths to get short external
Local<String> small_string = String::New(two_byte_string);
i::DeleteArray(two_byte_string);
@@ -503,7 +503,7 @@ TEST(MakingExternalStringConditions) {
// Old space strings should be accepted.
CHECK(small_string->CanMakeExternal());
- two_byte_string = AsciiToTwoByteString("abcdefghi");
+ two_byte_string = AsciiToTwoByteString("small 2");
small_string = String::New(two_byte_string);
i::DeleteArray(two_byte_string);
@@ -537,7 +537,7 @@ TEST(MakingExternalAsciiStringConditions) {
HEAP->CollectGarbage(i::NEW_SPACE);
HEAP->CollectGarbage(i::NEW_SPACE);
- Local<String> small_string = String::New("abcdefghi");
+ Local<String> small_string = String::New("small");
// We should refuse to externalize newly created small string.
CHECK(!small_string->CanMakeExternal());
// Trigger GCs so that the newly allocated string moves to old gen.
@@ -546,7 +546,7 @@ TEST(MakingExternalAsciiStringConditions) {
// Old space strings should be accepted.
CHECK(small_string->CanMakeExternal());
- small_string = String::New("abcdefghi");
+ small_string = String::New("small 2");
// We should refuse externalizing newly created small string.
CHECK(!small_string->CanMakeExternal());
for (int i = 0; i < 100; i++) {
« src/objects.cc ('K') | « src/serialize.cc ('k') | test/mjsunit/string-externalize.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698