*/
bool IsArrayBuffer() const;
+ /**
+ * Returns true if this value is an ArrayBufferView.
+ * This is an experimental feature.
+ */
+ bool IsArrayBufferView() const;
+
/**
* Returns true if this value is one of TypedArrays.
* This is an experimental feature.
*/
bool IsFloat64Array() const;
+ /**
+ * Returns true if this value is a DataView.
+ * This is an experimental feature.
+ */
+ bool IsDataView() const;
+
Local<Boolean> ToBoolean() const;
Local<Number> ToNumber() const;
Local<String> ToString() const;
/**
- * A base class for an instance of TypedArray series of constructors
- * (ES6 draft 15.13.6).
+ * A base class for an instance of one of "views" over ArrayBuffer,
+ * including TypedArrays and DataView (ES6 draft 15.13).
+ *
* This API is experimental and may change significantly.
*/
-class V8EXPORT TypedArray : public Object {
+class V8EXPORT ArrayBufferView : public Object {
public:
/**
* Returns underlying ArrayBuffer.
*/
Local<ArrayBuffer> Buffer();
/**
- * Byte offset in |Buffer|
+ * Byte offset in |Buffer|.
*/
size_t ByteOffset();
/**
- * Numbe of elements in this typed array.
- */
- size_t Length();
- /**
- * Size of typed array in bytes (e.g. for Int16Array, 2*|Length|).
+ * Size of a view in bytes.
*/
size_t ByteLength();
/**
- * Base address of typed array.
+ * Base address of a view.
*/
void* BaseAddress();
+ V8_INLINE(static ArrayBufferView* Cast(Value* obj));
+
+ private:
+ ArrayBufferView();
+ static void CheckCast(Value* obj);
+};
+
+
+/**
+ * A base class for an instance of TypedArray series of constructors
+ * (ES6 draft 15.13.6).
+ * This API is experimental and may change significantly.
+ */
+class V8EXPORT TypedArray : public ArrayBufferView {
+ public:
+ /**
+ * Number of elements in this typed array
+ * (e.g. for Int16Array, |ByteLength|/2).
+ */
+ size_t Length();
+
V8_INLINE(static TypedArray* Cast(Value* obj));
private:
};
+/**
+ * An instance of DataView constructor (ES6 draft 15.13.7).
+ * This API is experimental and may change significantly.
+ */
+class V8EXPORT DataView : public ArrayBufferView {
+ public:
+ static Local<DataView> New(Handle<ArrayBuffer> array_buffer,
+ size_t byte_offset, size_t length);
+ V8_INLINE(static DataView* Cast(Value* obj));
+
+ private:
+ DataView();
+ static void CheckCast(Value* obj);
+};
+
+
/**
* An instance of the built-in Date constructor (ECMA-262, 15.9).
*/
}
+ArrayBufferView* ArrayBufferView::Cast(v8::Value* value) {
+#ifdef V8_ENABLE_CHECKS
+ CheckCast(value);
+#endif
+ return static_cast<ArrayBufferView*>(value);
+}
+
+
TypedArray* TypedArray::Cast(v8::Value* value) {
#ifdef V8_ENABLE_CHECKS
CheckCast(value);
}
+DataView* DataView::Cast(v8::Value* value) {
+#ifdef V8_ENABLE_CHECKS
+ CheckCast(value);
+#endif
+ return static_cast<DataView*>(value);
+}
+
+
Function* Function::Cast(v8::Value* value) {
#ifdef V8_ENABLE_CHECKS
CheckCast(value);
}
+bool Value::IsArrayBufferView() const {
+ return Utils::OpenHandle(this)->IsJSArrayBufferView();
+}
+
+
bool Value::IsTypedArray() const {
if (IsDeadCheck(i::Isolate::Current(), "v8::Value::IsArrayBuffer()"))
return false;
#undef VALUE_IS_TYPED_ARRAY
+bool Value::IsDataView() const {
+ return Utils::OpenHandle(this)->IsJSDataView();
+}
+
+
bool Value::IsObject() const {
if (IsDeadCheck(i::Isolate::Current(), "v8::Value::IsObject()")) return false;
return Utils::OpenHandle(this)->IsJSObject();
}
+void v8::ArrayBufferView::CheckCast(Value* that) {
+ i::Handle<i::Object> obj = Utils::OpenHandle(that);
+ ApiCheck(obj->IsJSArrayBufferView(),
+ "v8::ArrayBufferView::Cast()",
+ "Could not convert to ArrayBufferView");
+}
+
+
void v8::TypedArray::CheckCast(Value* that) {
if (IsDeadCheck(i::Isolate::Current(), "v8::TypedArray::Cast()")) return;
i::Handle<i::Object> obj = Utils::OpenHandle(that);
#undef CHECK_TYPED_ARRAY_CAST
+void v8::DataView::CheckCast(Value* that) {
+ i::Handle<i::Object> obj = Utils::OpenHandle(that);
+ ApiCheck(obj->IsJSDataView(),
+ "v8::DataView::Cast()",
+ "Could not convert to DataView");
+}
+
+
void v8::Date::CheckCast(v8::Value* that) {
i::Isolate* isolate = i::Isolate::Current();
if (IsDeadCheck(isolate, "v8::Date::Cast()")) return;
}
-Local<ArrayBuffer> v8::TypedArray::Buffer() {
- i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
- if (IsDeadCheck(isolate, "v8::TypedArray::Buffer()"))
- return Local<ArrayBuffer>();
- i::Handle<i::JSTypedArray> obj = Utils::OpenHandle(this);
+Local<ArrayBuffer> v8::ArrayBufferView::Buffer() {
+ i::Handle<i::JSArrayBufferView> obj = Utils::OpenHandle(this);
ASSERT(obj->buffer()->IsJSArrayBuffer());
i::Handle<i::JSArrayBuffer> buffer(i::JSArrayBuffer::cast(obj->buffer()));
return Utils::ToLocal(buffer);
}
-size_t v8::TypedArray::ByteOffset() {
- i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
- if (IsDeadCheck(isolate, "v8::TypedArray::ByteOffset()")) return 0;
- i::Handle<i::JSTypedArray> obj = Utils::OpenHandle(this);
+size_t v8::ArrayBufferView::ByteOffset() {
+ i::Handle<i::JSArrayBufferView> obj = Utils::OpenHandle(this);
return static_cast<size_t>(obj->byte_offset()->Number());
}
-size_t v8::TypedArray::ByteLength() {
- i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
- if (IsDeadCheck(isolate, "v8::TypedArray::ByteLength()")) return 0;
- i::Handle<i::JSTypedArray> obj = Utils::OpenHandle(this);
+size_t v8::ArrayBufferView::ByteLength() {
+ i::Handle<i::JSArrayBufferView> obj = Utils::OpenHandle(this);
return static_cast<size_t>(obj->byte_length()->Number());
}
+void* v8::ArrayBufferView::BaseAddress() {
+ i::Handle<i::JSArrayBufferView> obj = Utils::OpenHandle(this);
+ i::Handle<i::JSArrayBuffer> buffer(i::JSArrayBuffer::cast(obj->buffer()));
+ void* buffer_data = buffer->backing_store();
+ size_t byte_offset = static_cast<size_t>(obj->byte_offset()->Number());
+ return static_cast<uint8_t*>(buffer_data) + byte_offset;
+}
+
+
size_t v8::TypedArray::Length() {
i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
if (IsDeadCheck(isolate, "v8::TypedArray::Length()")) return 0;
}
-void* v8::TypedArray::BaseAddress() {
- i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
- if (IsDeadCheck(isolate, "v8::TypedArray::BaseAddress()")) return NULL;
- i::Handle<i::JSTypedArray> obj = Utils::OpenHandle(this);
- i::Handle<i::JSArrayBuffer> buffer(i::JSArrayBuffer::cast(obj->buffer()));
- void* buffer_data = buffer->backing_store();
- size_t byte_offset = static_cast<size_t>(obj->byte_offset()->Number());
- return static_cast<uint8_t*>(buffer_data) + byte_offset;
-}
+static inline void SetupArrayBufferView(
+ i::Isolate* isolate,
+ i::Handle<i::JSArrayBufferView> obj,
+ i::Handle<i::JSArrayBuffer> buffer,
+ size_t byte_offset,
+ size_t byte_length) {
+ ASSERT(byte_offset + byte_length <=
+ static_cast<size_t>(buffer->byte_length()->Number()));
+
+ obj->set_buffer(*buffer);
+ obj->set_weak_next(buffer->weak_first_view());
+ buffer->set_weak_first_view(*obj);
+
+ i::Handle<i::Object> byte_offset_object =
+ isolate->factory()->NewNumberFromSize(byte_offset);
+ obj->set_byte_offset(*byte_offset_object);
+
+ i::Handle<i::Object> byte_length_object =
+ isolate->factory()->NewNumberFromSize(byte_length);
+ obj->set_byte_length(*byte_length_object);
+}
template<typename ElementType,
ExternalArrayType array_type,
i::Handle<i::JSArrayBuffer> buffer = Utils::OpenHandle(*array_buffer);
ASSERT(byte_offset % sizeof(ElementType) == 0);
- ASSERT(byte_offset + length * sizeof(ElementType) <=
- static_cast<size_t>(buffer->byte_length()->Number()));
-
- obj->set_buffer(*buffer);
-
- obj->set_weak_next(buffer->weak_first_view());
- buffer->set_weak_first_view(*obj);
- i::Handle<i::Object> byte_offset_object = isolate->factory()->NewNumber(
- static_cast<double>(byte_offset));
- obj->set_byte_offset(*byte_offset_object);
+ SetupArrayBufferView(
+ isolate, obj, buffer, byte_offset, length * sizeof(ElementType));
- i::Handle<i::Object> byte_length_object = isolate->factory()->NewNumber(
- static_cast<double>(length * sizeof(ElementType)));
- obj->set_byte_length(*byte_length_object);
-
- i::Handle<i::Object> length_object = isolate->factory()->NewNumber(
- static_cast<double>(length));
+ i::Handle<i::Object> length_object =
+ isolate->factory()->NewNumberFromSize(length);
obj->set_length(*length_object);
i::Handle<i::ExternalArray> elements =
#undef TYPED_ARRAY_NEW
+Local<DataView> DataView::New(Handle<ArrayBuffer> array_buffer,
+ size_t byte_offset, size_t byte_length) {
+ i::Isolate* isolate = i::Isolate::Current();
+ EnsureInitializedForIsolate(
+ isolate, "v8::DataView::New(void*, size_t, size_t)");
+ LOG_API(isolate, "v8::DataView::New(void*, size_t, size_t)");
+ ENTER_V8(isolate);
+ i::Handle<i::JSDataView> obj = isolate->factory()->NewJSDataView();
+ i::Handle<i::JSArrayBuffer> buffer = Utils::OpenHandle(*array_buffer);
+ SetupArrayBufferView(
+ isolate, obj, buffer, byte_offset, byte_length);
+ return Utils::ToLocal(obj);
+}
+
Local<Symbol> v8::Symbol::New(Isolate* isolate) {
i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
V(Object, JSObject) \
V(Array, JSArray) \
V(ArrayBuffer, JSArrayBuffer) \
+ V(ArrayBufferView, JSArrayBufferView) \
V(TypedArray, JSTypedArray) \
V(Uint8Array, JSTypedArray) \
V(Uint8ClampedArray, JSTypedArray) \
V(Int32Array, JSTypedArray) \
V(Float32Array, JSTypedArray) \
V(Float64Array, JSTypedArray) \
+ V(DataView, JSDataView) \
V(String, String) \
V(Symbol, Symbol) \
V(Script, Object) \
v8::internal::Handle<v8::internal::JSArray> obj);
static inline Local<ArrayBuffer> ToLocal(
v8::internal::Handle<v8::internal::JSArrayBuffer> obj);
+ static inline Local<ArrayBufferView> ToLocal(
+ v8::internal::Handle<v8::internal::JSArrayBufferView> obj);
+ static inline Local<DataView> ToLocal(
+ v8::internal::Handle<v8::internal::JSDataView> obj);
static inline Local<TypedArray> ToLocal(
v8::internal::Handle<v8::internal::JSTypedArray> obj);
MAKE_TO_LOCAL(ToLocal, JSObject, Object)
MAKE_TO_LOCAL(ToLocal, JSArray, Array)
MAKE_TO_LOCAL(ToLocal, JSArrayBuffer, ArrayBuffer)
+MAKE_TO_LOCAL(ToLocal, JSArrayBufferView, ArrayBufferView)
+MAKE_TO_LOCAL(ToLocal, JSDataView, DataView)
MAKE_TO_LOCAL(ToLocal, JSTypedArray, TypedArray)
MAKE_TO_LOCAL_TYPED_ARRAY(Uint8Array, kExternalUnsignedByteArray)
}
+static void CheckDataViewIsNeutered(v8::Handle<v8::DataView> dv) {
+ CHECK_EQ(0, static_cast<int>(dv->ByteLength()));
+ CHECK_EQ(0, static_cast<int>(dv->ByteOffset()));
+}
+
+
static void CheckIsNeutered(v8::Handle<v8::TypedArray> ta) {
CHECK_EQ(0, static_cast<int>(ta->ByteLength()));
CHECK_EQ(0, static_cast<int>(ta->Length()));
CHECK_EQ(0, static_cast<int>(ta->ByteOffset()));
}
+
+static void CheckIsTypedArrayVarNeutered(const char* name) {
+ i::ScopedVector<char> source(1024);
+ i::OS::SNPrintF(source,
+ "%s.byteLength == 0 && %s.byteOffset == 0 && %s.length == 0",
+ name, name, name);
+ CHECK(CompileRun(source.start())->IsTrue());
+ v8::Handle<v8::TypedArray> ta =
+ v8::Handle<v8::TypedArray>::Cast(CompileRun(name));
+ CheckIsNeutered(ta);
+}
+
+
template <typename TypedArray, int kElementSize>
static Handle<TypedArray> CreateAndCheck(Handle<v8::ArrayBuffer> ab,
int byteOffset,
v8::Handle<v8::Float64Array> f64a =
CreateAndCheck<v8::Float64Array, 8>(buffer, 8, 127);
+ v8::Handle<v8::DataView> dv = v8::DataView::New(buffer, 1, 1023);
+ CHECK_EQ(1, static_cast<int>(dv->ByteOffset()));
+ CHECK_EQ(1023, static_cast<int>(dv->ByteLength()));
+
ScopedArrayBufferContents contents(buffer->Externalize());
buffer->Neuter();
CHECK_EQ(0, static_cast<int>(buffer->ByteLength()));
CheckIsNeutered(i32a);
CheckIsNeutered(f32a);
CheckIsNeutered(f64a);
+ CheckDataViewIsNeutered(dv);
}
THREADED_TEST(ArrayBuffer_NeuteringScript) {
v8::Handle<v8::ArrayBuffer> ab =
Local<v8::ArrayBuffer>::Cast(CompileRun("ab"));
- v8::Handle<v8::Uint8Array> u8a =
- v8::Handle<v8::Uint8Array>::Cast(CompileRun("u8a"));
- v8::Handle<v8::Uint8ClampedArray> u8c =
- v8::Handle<v8::Uint8ClampedArray>::Cast(CompileRun("u8c"));
- v8::Handle<v8::Int8Array> i8a =
- v8::Handle<v8::Int8Array>::Cast(CompileRun("i8a"));
-
- v8::Handle<v8::Uint16Array> u16a =
- v8::Handle<v8::Uint16Array>::Cast(CompileRun("u16a"));
- v8::Handle<v8::Int16Array> i16a =
- v8::Handle<v8::Int16Array>::Cast(CompileRun("i16a"));
- v8::Handle<v8::Uint32Array> u32a =
- v8::Handle<v8::Uint32Array>::Cast(CompileRun("u32a"));
- v8::Handle<v8::Int32Array> i32a =
- v8::Handle<v8::Int32Array>::Cast(CompileRun("i32a"));
- v8::Handle<v8::Float32Array> f32a =
- v8::Handle<v8::Float32Array>::Cast(CompileRun("f32a"));
- v8::Handle<v8::Float64Array> f64a =
- v8::Handle<v8::Float64Array>::Cast(CompileRun("f64a"));
+ v8::Handle<v8::DataView> dv =
+ v8::Handle<v8::DataView>::Cast(CompileRun("dv"));
ScopedArrayBufferContents contents(ab->Externalize());
ab->Neuter();
CHECK_EQ(0, static_cast<int>(ab->ByteLength()));
- CheckIsNeutered(u8a);
- CheckIsNeutered(u8c);
- CheckIsNeutered(i8a);
- CheckIsNeutered(u16a);
- CheckIsNeutered(i16a);
- CheckIsNeutered(u32a);
- CheckIsNeutered(i32a);
- CheckIsNeutered(f32a);
- CheckIsNeutered(f64a);
+ CHECK_EQ(0, CompileRun("ab.byteLength")->Int32Value());
+
+ CheckIsTypedArrayVarNeutered("u8a");
+ CheckIsTypedArrayVarNeutered("u8c");
+ CheckIsTypedArrayVarNeutered("i8a");
+ CheckIsTypedArrayVarNeutered("u16a");
+ CheckIsTypedArrayVarNeutered("i16a");
+ CheckIsTypedArrayVarNeutered("u32a");
+ CheckIsTypedArrayVarNeutered("i32a");
+ CheckIsTypedArrayVarNeutered("f32a");
+ CheckIsTypedArrayVarNeutered("f64a");
+
CHECK(CompileRun("dv.byteLength == 0 && dv.byteOffset == 0")->IsTrue());
+ CheckDataViewIsNeutered(dv);
}
void TypedArrayTestHelper(v8::ExternalArrayType array_type,
int64_t low, int64_t high) {
const int kElementCount = 50;
- i::FLAG_harmony_array_buffer = true;
- i::FLAG_harmony_typed_arrays = true;
i::ScopedVector<ElementType> backing_store(kElementCount+2);
}
-#define IS_TYPED_ARRAY_TEST(TypedArray) \
- THREADED_TEST(Is##TypedArray) { \
+THREADED_TEST(DataView) {
+ const int kSize = 50;
+
+ i::ScopedVector<uint8_t> backing_store(kSize+2);
+
+ LocalContext env;
+ v8::Isolate* isolate = env->GetIsolate();
+ v8::HandleScope handle_scope(isolate);
+
+ Local<v8::ArrayBuffer> ab = v8::ArrayBuffer::New(
+ backing_store.start(), 2 + kSize);
+ Local<v8::DataView> dv =
+ v8::DataView::New(ab, 2, kSize);
+ CHECK_EQ(2, static_cast<int>(dv->ByteOffset()));
+ CHECK_EQ(kSize, static_cast<int>(dv->ByteLength()));
+ CHECK_EQ(ab, dv->Buffer());
+}
+
+
+#define IS_ARRAY_BUFFER_VIEW_TEST(View) \
+ THREADED_TEST(Is##View) { \
i::FLAG_harmony_array_buffer = true; \
i::FLAG_harmony_typed_arrays = true; \
LocalContext env; \
\
Handle<Value> result = CompileRun( \
"var ab = new ArrayBuffer(128);" \
- "new " #TypedArray "(ab)"); \
- CHECK(result->Is##TypedArray()); \
- }
-
-IS_TYPED_ARRAY_TEST(Uint8Array)
-IS_TYPED_ARRAY_TEST(Int8Array)
-IS_TYPED_ARRAY_TEST(Uint16Array)
-IS_TYPED_ARRAY_TEST(Int16Array)
-IS_TYPED_ARRAY_TEST(Uint32Array)
-IS_TYPED_ARRAY_TEST(Int32Array)
-IS_TYPED_ARRAY_TEST(Float32Array)
-IS_TYPED_ARRAY_TEST(Float64Array)
-IS_TYPED_ARRAY_TEST(Uint8ClampedArray)
-
-#undef IS_TYPED_ARRAY_TEST
+ "new " #View "(ab)"); \
+ CHECK(result->IsArrayBufferView()); \
+ CHECK(result->Is##View()); \
+ }
+
+IS_ARRAY_BUFFER_VIEW_TEST(Uint8Array)
+IS_ARRAY_BUFFER_VIEW_TEST(Int8Array)
+IS_ARRAY_BUFFER_VIEW_TEST(Uint16Array)
+IS_ARRAY_BUFFER_VIEW_TEST(Int16Array)
+IS_ARRAY_BUFFER_VIEW_TEST(Uint32Array)
+IS_ARRAY_BUFFER_VIEW_TEST(Int32Array)
+IS_ARRAY_BUFFER_VIEW_TEST(Float32Array)
+IS_ARRAY_BUFFER_VIEW_TEST(Float64Array)
+IS_ARRAY_BUFFER_VIEW_TEST(Uint8ClampedArray)
+IS_ARRAY_BUFFER_VIEW_TEST(DataView)
+
+#undef IS_ARRAY_BUFFER_VIEW_TEST
}
static bool HasViewInWeakList(JSArrayBuffer* array_buffer,
- JSObject* ta) {
+ JSArrayBufferView* ta) {
for (Object* o = array_buffer->weak_first_view();
!o->IsUndefined();
o = JSArrayBufferView::cast(o)->weak_next()) {
}
}
-template <typename TypedArray>
-void TestTypedArrayFromApi() {
+template <typename View>
+void TestViewFromApi() {
v8::V8::Initialize();
LocalContext context;
Isolate* isolate = GetIsolateFrom(&context);
Handle<JSArrayBuffer> iab = v8::Utils::OpenHandle(*ab);
{
v8::HandleScope s2(context->GetIsolate());
- v8::Handle<TypedArray> ta1 = TypedArray::New(ab, 0, 256);
+ v8::Handle<View> ta1 = View::New(ab, 0, 256);
{
v8::HandleScope s3(context->GetIsolate());
- v8::Handle<TypedArray> ta2 = TypedArray::New(ab, 0, 128);
+ v8::Handle<View> ta2 = View::New(ab, 0, 128);
- Handle<JSTypedArray> ita1 = v8::Utils::OpenHandle(*ta1);
- Handle<JSTypedArray> ita2 = v8::Utils::OpenHandle(*ta2);
+ Handle<JSArrayBufferView> ita1 = v8::Utils::OpenHandle(*ta1);
+ Handle<JSArrayBufferView> ita2 = v8::Utils::OpenHandle(*ta2);
CHECK_EQ(2, CountViews(*iab));
CHECK(HasViewInWeakList(*iab, *ita1));
CHECK(HasViewInWeakList(*iab, *ita2));
}
isolate->heap()->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
CHECK_EQ(1, CountViews(*iab));
- Handle<JSTypedArray> ita1 = v8::Utils::OpenHandle(*ta1);
+ Handle<JSArrayBufferView> ita1 = v8::Utils::OpenHandle(*ta1);
CHECK(HasViewInWeakList(*iab, *ita1));
}
isolate->heap()->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
TEST(Uint8ArrayFromApi) {
- TestTypedArrayFromApi<v8::Uint8Array>();
+ TestViewFromApi<v8::Uint8Array>();
}
TEST(Int8ArrayFromApi) {
- TestTypedArrayFromApi<v8::Int8Array>();
+ TestViewFromApi<v8::Int8Array>();
}
TEST(Uint16ArrayFromApi) {
- TestTypedArrayFromApi<v8::Uint16Array>();
+ TestViewFromApi<v8::Uint16Array>();
}
TEST(Int16ArrayFromApi) {
- TestTypedArrayFromApi<v8::Int16Array>();
+ TestViewFromApi<v8::Int16Array>();
}
TEST(Uint32ArrayFromApi) {
- TestTypedArrayFromApi<v8::Uint32Array>();
+ TestViewFromApi<v8::Uint32Array>();
}
TEST(Int32ArrayFromApi) {
- TestTypedArrayFromApi<v8::Int32Array>();
+ TestViewFromApi<v8::Int32Array>();
}
TEST(Float32ArrayFromApi) {
- TestTypedArrayFromApi<v8::Float32Array>();
+ TestViewFromApi<v8::Float32Array>();
}
TEST(Float64ArrayFromApi) {
- TestTypedArrayFromApi<v8::Float64Array>();
+ TestViewFromApi<v8::Float64Array>();
}
TEST(Uint8ClampedArrayFromApi) {
- TestTypedArrayFromApi<v8::Uint8ClampedArray>();
+ TestViewFromApi<v8::Uint8ClampedArray>();
+}
+
+
+TEST(DataViewFromApi) {
+ TestViewFromApi<v8::DataView>();
}
template <typename TypedArray>
TEST(DataViewFromScript) {
- TestTypedArrayFromScript<v8::Object>("DataView");
+ TestTypedArrayFromScript<v8::DataView>("DataView");
}