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

Unified Diff: src/objects-printer.cc

Issue 15943002: v8 typed arrays: add DataView type (Closed)
Patch Set: v8 typed arrays: add DataView type, v2 Created 7 years, 7 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
Index: src/objects-printer.cc
diff --git a/src/objects-printer.cc b/src/objects-printer.cc
index f3127940988ce89133defe817fa718f2814aac05..8782c5ba2215c4aa6573e47e31aadb1dc5dc2c02 100644
--- a/src/objects-printer.cc
+++ b/src/objects-printer.cc
@@ -188,6 +188,9 @@ void HeapObject::HeapObjectPrint(FILE* out) {
case JS_ARRAY_BUFFER_TYPE:
JSArrayBuffer::cast(this)->JSArrayBufferPrint(out);
break;
+ case JS_DATA_VIEW_TYPE:
+ JSDataView::cast(this)->JSDataViewPrint(out);
+ break;
case JS_TYPED_ARRAY_TYPE:
JSTypedArray::cast(this)->JSTypedArrayPrint(out);
break;
@@ -813,6 +816,22 @@ void JSArrayBuffer::JSArrayBufferPrint(FILE* out) {
}
+void JSDataView::JSDataViewPrint(FILE* out) {
+ HeapObject::PrintHeader(out, "JSDataView");
+ PrintF(out, " - map = 0x%p\n", reinterpret_cast<void*>(map()));
+ PrintF(out, " - buffer =");
+ buffer()->ShortPrint(out);
+ PrintF(out, "\n - byte_offset = ");
+ byte_offset()->ShortPrint(out);
+ PrintF(out, "\n - byte_length = ");
+ byte_length()->ShortPrint(out);
+ PrintF(out, " - byte_length = ");
+ byte_length()->ShortPrint(out);
+ PrintF(out, "\n");
+ PrintElements(out);
+}
+
+
void JSTypedArray::JSTypedArrayPrint(FILE* out) {
HeapObject::PrintHeader(out, "JSTypedArray");
PrintF(out, " - map = 0x%p\n", reinterpret_cast<void*>(map()));

Powered by Google App Engine
This is Rietveld 408576698