[cctest] Fix invalid assumption in test-unboxed-doubles

test-unboxed-doubles/WriteBarrierObjectShiftFieldsRight recently started
failing on arm64-nosnapshot builds due to a broken CHECK.

# Fatal error in ../../test/cctest/test-unboxed-doubles.cc, line 1417
# Check failed: heap->InNewSpace(*obj_value).

It expects the result of Factory::NewJSArray() to be in new
space; but NewJSArray encapsulates two allocations so the return value can
actually be in old space. Fix it by ensuring only one allocation occurs.

BUG=v8:5339

Review-Url: https://codereview.chromium.org/2759433002
Cr-Commit-Position: refs/heads/master@{#43886}
This commit is contained in:
jgruber 2017-03-17 03:16:54 -07:00 committed by Commit bot
parent 877d9758eb
commit ad75ded221

View File

@ -1411,7 +1411,7 @@ static void TestWriteBarrier(Handle<Map> map, Handle<Map> new_map,
obj = factory->NewJSObjectFromMap(map, TENURED);
CHECK(old_space->Contains(*obj));
obj_value = factory->NewJSArray(32 * KB, FAST_HOLEY_ELEMENTS);
obj_value = factory->NewHeapNumber(0.);
}
CHECK(heap->InNewSpace(*obj_value));