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

Unified Diff: src/objects.cc

Issue 1101993002: Fix adding to WeakFixedArray after compaction. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « no previous file | test/cctest/test-heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index f3733295c4dc1baf9d27330aa5a4200a3a3b999b..babcf671672c88ad226345caebfefdf9fd6a7225 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -8310,6 +8310,7 @@ void WeakFixedArray::Compact() {
if (WeakCell::cast(element)->cleared()) continue;
array->set(new_length++, element);
}
+ if (new_length == kFirstIndex) new_length++;
array->Shrink(new_length);
set_last_used_index(0);
}
« no previous file with comments | « no previous file | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698