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

Unified Diff: src/runtime.cc

Issue 3380031: Fix external array iteration used in array concat. (Closed)
Patch Set: Created 10 years, 3 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/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 8d58db74a017a357d005a22818716976c2e9e5c6..dd922ed8cd6dee1e687f5e2584a7b84e4dd88469 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -7253,15 +7253,15 @@ static uint32_t IterateExternalArrayElements(Handle<JSObject> receiver,
Handle<Smi> e(Smi::FromInt(static_cast<int>(val)));
visitor->visit(j, e);
} else {
- Handle<Object> e(
- Heap::AllocateHeapNumber(static_cast<ElementType>(val)));
+ Handle<Object> e =
+ Factory::NewNumber(static_cast<ElementType>(val));
visitor->visit(j, e);
}
}
}
} else {
for (uint32_t j = 0; j < len; j++) {
- Handle<Object> e(Heap::AllocateHeapNumber(array->get(j)));
+ Handle<Object> e = Factory::NewNumber(array->get(j));
visitor->visit(j, e);
}
}
« 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