Reviewers: jarin,

Description:
Only double align in PagedSpace::AllocateRawDoubleAligned when allocation
succeeded.

BUG=chromium:486003
LOG=n

Please review this at https://codereview.chromium.org/1136783002/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+3, -1 lines):
  M src/heap/spaces-inl.h


Index: src/heap/spaces-inl.h
diff --git a/src/heap/spaces-inl.h b/src/heap/spaces-inl.h
index caa53ecee13077181908e5374c10eef10670d89d..78fda3c1e1562b99b99a9aa267b5b3ae79614868 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) {


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to