Reviewers: Jakob,

Message:
PTaL.

Description:
Adding missing hole check to FixedDoubleArray::Initialize


Please review this at http://codereview.chromium.org/8281001/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/objects-inl.h


Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index ffed9f01a6d89478e844266210e5ae0ce342bd2c..267880d7b88994db40c06c02b69787e09e49577a 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -1739,7 +1739,11 @@ void FixedDoubleArray::Initialize(FixedDoubleArray* from) {
                 old_length * kDoubleSize);
   } else {
     for (int i = 0; i < old_length; ++i) {
-      set(i, from->get_scalar(i));
+      if (from->is_the_hole(i)) {
+        set_the_hole(i);
+      } else {
+        set(i, from->get_scalar(i));
+      }
     }
   }
   int offset = kHeaderSize + old_length * kDoubleSize;


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to