Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(301)

Unified Diff: src/objects-inl.h

Issue 8281001: Adding missing hole check to FixedDoubleArray::Initialize (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698