summaryrefslogtreecommitdiff
path: root/deps/v8/test/cctest/test-api.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/cctest/test-api.cc')
-rw-r--r--deps/v8/test/cctest/test-api.cc22
1 files changed, 12 insertions, 10 deletions
diff --git a/deps/v8/test/cctest/test-api.cc b/deps/v8/test/cctest/test-api.cc
index e06cb77c62..a9780f0332 100644
--- a/deps/v8/test/cctest/test-api.cc
+++ b/deps/v8/test/cctest/test-api.cc
@@ -8376,7 +8376,7 @@ THREADED_TEST(Regress91517) {
// Call the runtime version of GetLocalPropertyNames() on the natively
// created object through JavaScript.
context->Global()->Set(v8_str("obj"), o4);
- CompileRun("var names = %GetLocalPropertyNames(obj);");
+ CompileRun("var names = %GetLocalPropertyNames(obj, true);");
ExpectInt32("names.length", 1006);
ExpectTrue("names.indexOf(\"baz\") >= 0");
@@ -16054,15 +16054,17 @@ THREADED_TEST(TwoByteStringInAsciiCons) {
CHECK(flat_string->IsTwoByteRepresentation());
- // At this point, we should have a Cons string which is flat and ASCII,
- // with a first half that is a two-byte string (although it only contains
- // ASCII characters). This is a valid sequence of steps, and it can happen
- // in real pages.
-
- CHECK(string->IsOneByteRepresentation());
- i::ConsString* cons = i::ConsString::cast(*string);
- CHECK_EQ(0, cons->second()->length());
- CHECK(cons->first()->IsTwoByteRepresentation());
+ // If the cons string has been short-circuited, skip the following checks.
+ if (!string.is_identical_to(flat_string)) {
+ // At this point, we should have a Cons string which is flat and ASCII,
+ // with a first half that is a two-byte string (although it only contains
+ // ASCII characters). This is a valid sequence of steps, and it can happen
+ // in real pages.
+ CHECK(string->IsOneByteRepresentation());
+ i::ConsString* cons = i::ConsString::cast(*string);
+ CHECK_EQ(0, cons->second()->length());
+ CHECK(cons->first()->IsTwoByteRepresentation());
+ }
// Check that some string operations work.