Index: test/cctest/test-api.cc |
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc |
index 29e989fda7f556ef3e03d62989fc514248322fc5..00c262ad9c34b220414fc2bd1be1be32822f7bdf 100644 |
--- a/test/cctest/test-api.cc |
+++ b/test/cctest/test-api.cc |
@@ -13819,10 +13819,9 @@ |
i::Factory* factory = isolate->factory(); |
v8::HandleScope scope(context->GetIsolate()); |
const int kElementCount = 260; |
- i::Handle<i::JSTypedArray> jsobj = |
- factory->NewJSTypedArray(elements_kind, kElementCount); |
- i::Handle<FixedTypedArrayClass> fixed_array( |
- FixedTypedArrayClass::cast(jsobj->elements())); |
+ i::Handle<FixedTypedArrayClass> fixed_array = |
+ i::Handle<FixedTypedArrayClass>::cast( |
+ factory->NewFixedTypedArray(kElementCount, array_type)); |
CHECK_EQ(FixedTypedArrayClass::kInstanceType, |
fixed_array->map()->instance_type()); |
CHECK_EQ(kElementCount, fixed_array->length()); |
@@ -13836,7 +13835,12 @@ |
CHECK_EQ(static_cast<int64_t>(static_cast<ElementType>(i)), |
static_cast<int64_t>(fixed_array->get_scalar(i))); |
} |
- v8::Handle<v8::Object> obj = v8::Utils::ToLocal(jsobj); |
+ v8::Handle<v8::Object> obj = v8::Object::New(CcTest::isolate()); |
+ i::Handle<i::JSObject> jsobj = v8::Utils::OpenHandle(*obj); |
+ i::Handle<i::Map> fixed_array_map = |
+ i::JSObject::GetElementsTransitionMap(jsobj, elements_kind); |
+ jsobj->set_map(*fixed_array_map); |
+ jsobj->set_elements(*fixed_array); |
ObjectWithExternalArrayTestHelper<FixedTypedArrayClass, ElementType>( |
context.local(), obj, kElementCount, array_type, |