Index: src/objects-debug.cc |
diff --git a/src/objects-debug.cc b/src/objects-debug.cc |
index 44cab53cc7ae90696e7c34929084e0e6e1e318bd..56053a03d95db5169185919041fe8742616b5ede 100644 |
--- a/src/objects-debug.cc |
+++ b/src/objects-debug.cc |
@@ -198,6 +198,9 @@ void HeapObject::HeapObjectVerify() { |
case JS_ARRAY_BUFFER_TYPE: |
JSArrayBuffer::cast(this)->JSArrayBufferVerify(); |
break; |
+ case JS_TYPED_ARRAY_TYPE: |
+ JSTypedArray::cast(this)->JSTypedArrayVerify(); |
+ break; |
#define MAKE_STRUCT_CASE(NAME, Name, name) \ |
case NAME##_TYPE: \ |
@@ -724,6 +727,28 @@ void JSArrayBuffer::JSArrayBufferVerify() { |
} |
+void JSTypedArray::JSTypedArrayVerify() { |
+ CHECK(IsJSTypedArray()); |
+ JSObjectVerify(); |
+ VerifyPointer(buffer()); |
+ CHECK(buffer()->IsJSArrayBuffer() || buffer()->IsUndefined()); |
+ |
+ VerifyPointer(byte_offset()); |
+ CHECK(byte_offset()->IsSmi() || byte_offset()->IsHeapNumber() |
+ || byte_offset()->IsUndefined()); |
+ |
+ VerifyPointer(byte_length()); |
+ CHECK(byte_length()->IsSmi() || byte_length()->IsHeapNumber() |
+ || byte_length()->IsUndefined()); |
+ |
+ VerifyPointer(length()); |
+ CHECK(length()->IsSmi() || length()->IsHeapNumber() |
+ || length()->IsUndefined()); |
+ |
+ VerifyPointer(elements()); |
+} |
+ |
+ |
void Foreign::ForeignVerify() { |
CHECK(IsForeign()); |
} |