Revision: 21037
Author:   [email protected]
Date:     Tue Apr 29 08:24:54 2014 UTC
Log:      Add missing length check when copying fixed arrays.

This was mistakenly removed in r21027.

[email protected]

Review URL: https://codereview.chromium.org/259203002
http://code.google.com/p/v8/source/detail?r=21037

Modified:
 /branches/bleeding_edge/src/heap-inl.h

=======================================
--- /branches/bleeding_edge/src/heap-inl.h      Tue Apr 29 06:42:26 2014 UTC
+++ /branches/bleeding_edge/src/heap-inl.h      Tue Apr 29 08:24:54 2014 UTC
@@ -161,16 +161,19 @@
 }

 MaybeObject* Heap::CopyFixedArray(FixedArray* src) {
+  if (src->length() == 0) return src;
   return CopyFixedArrayWithMap(src, src->map());
 }


 MaybeObject* Heap::CopyFixedDoubleArray(FixedDoubleArray* src) {
+  if (src->length() == 0) return src;
   return CopyFixedDoubleArrayWithMap(src, src->map());
 }


 MaybeObject* Heap::CopyConstantPoolArray(ConstantPoolArray* src) {
+  if (src->length() == 0) return src;
   return CopyConstantPoolArrayWithMap(src, src->map());
 }

--
--
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