Commit 02c33537 authored by yangguo@chromium.org's avatar yangguo@chromium.org

Add missing length check when copying fixed arrays.

This was mistakenly removed in r21027.

R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21037 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 14f132c2
......@@ -161,16 +161,19 @@ MaybeObject* Heap::AllocateTwoByteInternalizedString(Vector<const uc16> str,
}
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());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment