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

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

Issue 1107843002: Reland "Remove the weak list of views from array buffers" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: use bounds check Created 5 years, 8 months 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
« no previous file with comments | « src/snapshot/serialize.cc ('k') | test/cctest/test-heap-profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index 4ef83c71ed5983b03365f69bb564fe6c6fecc54b..3f568beb4a8f1404aae54804e886aa04c321ac6f 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -13728,9 +13728,10 @@ static void FixedTypedArrayTestHelper(i::ExternalArrayType array_type,
i::Factory* factory = isolate->factory();
v8::HandleScope scope(context->GetIsolate());
const int kElementCount = 260;
- i::Handle<FixedTypedArrayClass> fixed_array =
- i::Handle<FixedTypedArrayClass>::cast(
- factory->NewFixedTypedArray(kElementCount, array_type));
+ i::Handle<i::JSTypedArray> jsobj =
+ factory->NewJSTypedArray(elements_kind, kElementCount);
+ i::Handle<FixedTypedArrayClass> fixed_array(
+ FixedTypedArrayClass::cast(jsobj->elements()));
CHECK_EQ(FixedTypedArrayClass::kInstanceType,
fixed_array->map()->instance_type());
CHECK_EQ(kElementCount, fixed_array->length());
@@ -13744,12 +13745,7 @@ static void FixedTypedArrayTestHelper(i::ExternalArrayType array_type,
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::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);
+ v8::Handle<v8::Object> obj = v8::Utils::ToLocal(jsobj);
ObjectWithExternalArrayTestHelper<FixedTypedArrayClass, ElementType>(
context.local(), obj, kElementCount, array_type,
« no previous file with comments | « src/snapshot/serialize.cc ('k') | test/cctest/test-heap-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698