Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index 4d8a45bb2d58d3066219dfc01d80b03ea64af9c9..7768272e55ef86e88ee8d5f6261d97f94fa09829 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -4001,6 +4001,14 @@ class WeakHashTable: public HashTable<WeakHashTableShape<2>, Object*> { |
// key to the hole value causes removal of the whole entry. |
MUST_USE_RESULT MaybeObject* Put(Object* key, Object* value); |
+ void Zap(Object* value) { |
Michael Starzinger
2013/10/04 11:33:40
nit: Maybe add a short one-liner comment explainin
ulan
2013/10/04 11:37:18
Done.
|
+ int capacity = Capacity(); |
+ for (int i = 0; i < capacity; i++) { |
+ set(EntryToIndex(i), value); |
+ set(EntryToValueIndex(i), value); |
+ } |
+ } |
+ |
private: |
friend class MarkCompactCollector; |