| Index: test/cctest/test-unboxed-doubles.cc
|
| diff --git a/test/cctest/test-unboxed-doubles.cc b/test/cctest/test-unboxed-doubles.cc
|
| index cad32b725e190f6eb99eec3d19bb978ec408fe9f..f195a31c7972424294ca62bd78938634ae1b4603 100644
|
| --- a/test/cctest/test-unboxed-doubles.cc
|
| +++ b/test/cctest/test-unboxed-doubles.cc
|
| @@ -12,6 +12,7 @@
|
| #include "src/factory.h"
|
| #include "src/field-type.h"
|
| #include "src/global-handles.h"
|
| +#include "src/heap/slots-buffer.h"
|
| #include "src/ic/ic.h"
|
| #include "src/macro-assembler.h"
|
| #include "test/cctest/cctest.h"
|
| @@ -1473,11 +1474,18 @@ static void TestIncrementalWriteBarrier(Handle<Map> map, Handle<Map> new_map,
|
| CHECK(Marking::IsBlack(Marking::MarkBitFrom(*obj_value)));
|
| CHECK(MarkCompactCollector::IsOnEvacuationCandidate(*obj_value));
|
|
|
| - // Trigger incremental write barrier, which should add a slot to remembered
|
| - // set.
|
| + // Trigger incremental write barrier, which should add a slot to |ec_page|'s
|
| + // slots buffer.
|
| {
|
| + int slots_buffer_len = SlotsBuffer::SizeOfChain(ec_page->slots_buffer());
|
| FieldIndex index = FieldIndex::ForDescriptor(*map, tagged_descriptor);
|
| - obj->FastPropertyAtPut(index, *obj_value);
|
| + const int n = SlotsBuffer::kNumberOfElements + 10;
|
| + for (int i = 0; i < n; i++) {
|
| + obj->FastPropertyAtPut(index, *obj_value);
|
| + }
|
| + // Ensure that the slot was actually added to the |ec_page|'s slots buffer.
|
| + CHECK_EQ(slots_buffer_len + n,
|
| + SlotsBuffer::SizeOfChain(ec_page->slots_buffer()));
|
| }
|
|
|
| // Migrate |obj| to |new_map| which should shift fields and put the
|
|
|