Only double align in PagedSpace::AllocateRawDoubleAligned when allocation succeeded.
authorhpayer <hpayer@chromium.org>
Sat, 9 May 2015 10:29:33 +0000 (03:29 -0700)
committerCommit bot <commit-bot@chromium.org>
Sat, 9 May 2015 10:29:38 +0000 (10:29 +0000)
BUG=chromium:486003
LOG=n

Review URL: https://codereview.chromium.org/1136783002

Cr-Commit-Position: refs/heads/master@{#28326}

src/heap/spaces-inl.h

index caa53ec..78fda3c 100644 (file)
@@ -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) {