Index: src/heap-snapshot-generator.cc |
diff --git a/src/heap-snapshot-generator.cc b/src/heap-snapshot-generator.cc |
index 87d7819da5be0af475e9b68b6f5a033570cb1ae9..4a847651efdb02daf28acb5196b4b62fcad85c26 100644 |
--- a/src/heap-snapshot-generator.cc |
+++ b/src/heap-snapshot-generator.cc |
@@ -1097,6 +1097,10 @@ bool V8HeapExplorer::ExtractReferencesPass1(int entry, HeapObject* obj) { |
ExtractJSGlobalProxyReferences(entry, JSGlobalProxy::cast(obj)); |
} else if (obj->IsJSArrayBuffer()) { |
ExtractJSArrayBufferReferences(entry, JSArrayBuffer::cast(obj)); |
+ } else if (obj->IsJSWeakSet()) { |
+ ExtractJSWeakCollectionReferences(entry, JSWeakSet::cast(obj)); |
+ } else if (obj->IsJSWeakMap()) { |
+ ExtractJSWeakCollectionReferences(entry, JSWeakMap::cast(obj)); |
} else if (obj->IsJSObject()) { |
ExtractJSObjectReferences(entry, JSObject::cast(obj)); |
} else if (obj->IsString()) { |
@@ -1256,6 +1260,15 @@ void V8HeapExplorer::ExtractSymbolReferences(int entry, Symbol* symbol) { |
} |
+void V8HeapExplorer::ExtractJSWeakCollectionReferences( |
+ int entry, JSWeakCollection* collection) { |
+ MarkAsWeakContainer(collection->table()); |
+ SetInternalReference(collection, entry, |
+ "table", collection->table(), |
+ JSWeakCollection::kTableOffset); |
+} |
+ |
+ |
void V8HeapExplorer::ExtractContextReferences(int entry, Context* context) { |
if (context == context->declaration_context()) { |
ScopeInfo* scope_info = context->closure()->shared()->scope_info(); |