[heap] Fix LAB tests

Let's not write out of bounds here.

R=hpayer@chromium.org
BUG=chromium:636331

Review-Url: https://codereview.chromium.org/2237473002
Cr-Commit-Position: refs/heads/master@{#38547}
This commit is contained in:
mlippautz 2016-08-10 08:57:45 -07:00 committed by Commit bot
parent c78c499a64
commit 09e7c01b31

View File

@ -170,7 +170,7 @@ TEST(MergeSuccessful) {
CcTest::InitializeVM();
Heap* heap = CcTest::heap();
const int kLabSize = 2 * KB;
Address base1 = AllocateLabBackingStore(heap, kLabSize);
Address base1 = AllocateLabBackingStore(heap, 2 * kLabSize);
Address limit1 = base1 + kLabSize;
Address base2 = limit1;
Address limit2 = base2 + kLabSize;
@ -226,7 +226,7 @@ TEST(MergeFailed) {
CcTest::InitializeVM();
Heap* heap = CcTest::heap();
const int kLabSize = 2 * KB;
Address base1 = AllocateLabBackingStore(heap, kLabSize);
Address base1 = AllocateLabBackingStore(heap, 3 * kLabSize);
Address base2 = base1 + kLabSize;
Address base3 = base2 + kLabSize;