| Index: test/cctest/test-api.cc
|
| diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
|
| index 93ed66b2180fa6ab8410a2de300ee36aca9e27cb..f92e3f5dbe2f09d7e108561c3caf86f2ef381c3e 100644
|
| --- a/test/cctest/test-api.cc
|
| +++ b/test/cctest/test-api.cc
|
| @@ -21384,18 +21384,14 @@ TEST(Map) {
|
| map = v8::Local<v8::Map>::Cast(val);
|
| CHECK_EQ(2, map->Size());
|
|
|
| - v8::Local<v8::Array> entries = map->AsArray();
|
| - CHECK_EQ(2, entries->Length());
|
| - v8::Local<v8::Array> entry = entries->Get(0).As<v8::Array>();
|
| - CHECK_EQ(2, entry->Length());
|
| - CHECK_EQ(1, entry->Get(0).As<v8::Int32>()->Value());
|
| - CHECK_EQ(2, entry->Get(1).As<v8::Int32>()->Value());
|
| - entry = entries->Get(1).As<v8::Array>();
|
| - CHECK_EQ(2, entry->Length());
|
| - CHECK_EQ(3, entry->Get(0).As<v8::Int32>()->Value());
|
| - CHECK_EQ(4, entry->Get(1).As<v8::Int32>()->Value());
|
| -
|
| - map = v8::Map::FromArray(env.local(), entries).ToLocalChecked();
|
| + v8::Local<v8::Array> contents = map->AsArray();
|
| + CHECK_EQ(4, contents->Length());
|
| + CHECK_EQ(1, contents->Get(0).As<v8::Int32>()->Value());
|
| + CHECK_EQ(2, contents->Get(1).As<v8::Int32>()->Value());
|
| + CHECK_EQ(3, contents->Get(2).As<v8::Int32>()->Value());
|
| + CHECK_EQ(4, contents->Get(3).As<v8::Int32>()->Value());
|
| +
|
| + map = v8::Map::FromArray(env.local(), contents).ToLocalChecked();
|
| CHECK_EQ(2, map->Size());
|
| }
|
|
|
|
|