Index: src/objects-printer.cc |
diff --git a/src/objects-printer.cc b/src/objects-printer.cc |
index fa03447a3b9563ee8e24503ed667275a5193b26a..4f01455445079ec7d21b928a1bd746b0021217a1 100644 |
--- a/src/objects-printer.cc |
+++ b/src/objects-printer.cc |
@@ -151,6 +151,9 @@ void HeapObject::HeapObjectPrint(FILE* out) { |
case JS_PROXY_TYPE: |
JSProxy::cast(this)->JSProxyPrint(out); |
break; |
+ case JS_WEAK_MAP_TYPE: |
+ JSWeakMap::cast(this)->JSWeakMapPrint(out); |
+ break; |
case FOREIGN_TYPE: |
Foreign::cast(this)->ForeignPrint(out); |
break; |
@@ -431,6 +434,7 @@ static const char* TypeToString(InstanceType type) { |
case CODE_TYPE: return "CODE"; |
case JS_ARRAY_TYPE: return "JS_ARRAY"; |
case JS_PROXY_TYPE: return "JS_PROXY"; |
+ case JS_WEAK_MAP_TYPE: return "JS_WEAK_MAP"; |
case JS_REGEXP_TYPE: return "JS_REGEXP"; |
case JS_VALUE_TYPE: return "JS_VALUE"; |
case JS_GLOBAL_OBJECT_TYPE: return "JS_GLOBAL_OBJECT"; |
@@ -569,6 +573,16 @@ void JSProxy::JSProxyPrint(FILE* out) { |
} |
+void JSWeakMap::JSWeakMapPrint(FILE* out) { |
+ HeapObject::PrintHeader(out, "JSWeakMap"); |
+ PrintF(out, " - map = 0x%p\n", reinterpret_cast<void*>(map())); |
+ PrintF(out, " - number of elements = %d\n", table()->NumberOfElements()); |
+ PrintF(out, " - table = "); |
+ table()->ShortPrint(out); |
+ PrintF(out, "\n"); |
+} |
+ |
+ |
void JSFunction::JSFunctionPrint(FILE* out) { |
HeapObject::PrintHeader(out, "Function"); |
PrintF(out, " - map = 0x%p\n", reinterpret_cast<void*>(map())); |