Index: src/builtins.cc |
diff --git a/src/builtins.cc b/src/builtins.cc |
index e460a8f39300beb9ef5963c3833f9ca27c6b5321..62bcb90346f0c985a2a011305bdb95abd684abea 100644 |
--- a/src/builtins.cc |
+++ b/src/builtins.cc |
@@ -223,6 +223,8 @@ static void FillWithHoles(FixedDoubleArray* dst, int from, int to) { |
static FixedArrayBase* LeftTrimFixedArray(Heap* heap, |
FixedArrayBase* elms, |
int to_trim) { |
+ ASSERT(heap->CanMoveObjectStart(elms)); |
+ |
Map* map = elms->map(); |
int entry_size; |
if (elms->IsFixedArray()) { |
@@ -259,6 +261,8 @@ static FixedArrayBase* LeftTrimFixedArray(Heap* heap, |
// Technically in new space this write might be omitted (except for |
// debug mode which iterates through the heap), but to play safer |
// we still do it. |
+ // Since left trimming is only performed on pages which are not concurrently |
+ // swept creating a filler object does not require synchronization. |
heap->CreateFillerObjectAt(elms->address(), to_trim * entry_size); |
int new_start_index = to_trim * (entry_size / kPointerSize); |