From: hpayer Date: Sat, 9 May 2015 10:29:33 +0000 (-0700) Subject: Only double align in PagedSpace::AllocateRawDoubleAligned when allocation succeeded. X-Git-Tag: upstream/4.7.83~2714 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f06534b944cccbd80c3cddce3edb2ef2b1ff81f2;p=platform%2Fupstream%2Fv8.git 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} --- 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) {