Upgrade V8 to 5.1.281.57 DO NOT MERGE
FPIIM-449
Change-Id: Id981b686b4d587ac31697662eb98bb34be42ad90
(cherry picked from commit 3b9bc31999c9787eb726ecdbfd5796bfdec32a18)
diff --git a/test/cctest/test-strings.cc b/test/cctest/test-strings.cc
index e992f33..770042d 100644
--- a/test/cctest/test-strings.cc
+++ b/test/cctest/test-strings.cc
@@ -1508,3 +1508,25 @@
"'arg0' returned for property 'arg1' of object 'arg2' is not a function");
CHECK(String::Equals(result, expected));
}
+
+TEST(Regress609831) {
+ CcTest::InitializeVM();
+ LocalContext context;
+ Isolate* isolate = CcTest::i_isolate();
+ {
+ HandleScope scope(isolate);
+ v8::Local<v8::Value> result = CompileRun(
+ "String.fromCharCode(32, 32, 32, 32, 32, "
+ "32, 32, 32, 32, 32, 32, 32, 32, 32, 32, "
+ "32, 32, 32, 32, 32, 32, 32, 32, 32, 32)");
+ CHECK(v8::Utils::OpenHandle(*result)->IsSeqOneByteString());
+ }
+ {
+ HandleScope scope(isolate);
+ v8::Local<v8::Value> result = CompileRun(
+ "String.fromCharCode(432, 432, 432, 432, 432, "
+ "432, 432, 432, 432, 432, 432, 432, 432, 432, "
+ "432, 432, 432, 432, 432, 432, 432, 432, 432)");
+ CHECK(v8::Utils::OpenHandle(*result)->IsSeqTwoByteString());
+ }
+}