From f06534b944cccbd80c3cddce3edb2ef2b1ff81f2 Mon Sep 17 00:00:00 2001 From: hpayer Date: Sat, 9 May 2015 03:29:33 -0700 Subject: [PATCH] Only double align in PagedSpace::AllocateRawDoubleAligned when allocation succeeded. BUG=chromium:486003 LOG=n Review URL: https://codereview.chromium.org/1136783002 Cr-Commit-Position: refs/heads/master@{#28326} --- src/heap/spaces-inl.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/heap/spaces-inl.h b/src/heap/spaces-inl.h index caa53ec..78fda3c 100644 --- a/src/heap/spaces-inl.h +++ b/src/heap/spaces-inl.h @@ -303,7 +303,9 @@ AllocationResult PagedSpace::AllocateRawDoubleAligned(int size_in_bytes) { if (object == NULL) { object = SlowAllocateRaw(aligned_size_in_bytes); } - object = heap()->EnsureDoubleAligned(object, aligned_size_in_bytes); + if (object != NULL) { + object = heap()->EnsureDoubleAligned(object, aligned_size_in_bytes); + } } if (object != NULL) { -- 2.7.4