Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index f9a52e59c7455d2986ade2ac70296c2dd5db5034..b7928af19361db20e754f564a6dfe7f02c1dc49f 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -16168,7 +16168,10 @@ Handle<WeakHashTable> WeakHashTable::Put(Handle<WeakHashTable> table, |
int entry = table->FindEntry(key); |
// Key is already in table, just overwrite value. |
if (entry != kNotFound) { |
- table->set(EntryToValueIndex(entry), *value); |
+ // TODO(ulan): Skipping write barrier is a temporary solution to avoid |
+ // memory leaks. Remove this once we have special visitor for weak fixed |
+ // arrays. |
+ table->set(EntryToValueIndex(entry), *value, SKIP_WRITE_BARRIER); |
return table; |
} |
@@ -16184,8 +16187,11 @@ void WeakHashTable::AddEntry(int entry, |
Handle<Object> key, |
Handle<Object> value) { |
DisallowHeapAllocation no_allocation; |
- set(EntryToIndex(entry), *key); |
- set(EntryToValueIndex(entry), *value); |
+ // TODO(ulan): Skipping write barrier is a temporary solution to avoid |
+ // memory leaks. Remove this once we have special visitor for weak fixed |
+ // arrays. |
+ set(EntryToIndex(entry), *key, SKIP_WRITE_BARRIER); |
+ set(EntryToValueIndex(entry), *value, SKIP_WRITE_BARRIER); |
ElementAdded(); |
} |