Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index d3baaa440cf7c49a64d1d3a5baeefa0eac4e1162..f7698eb189a34b6962da22812756e020af88bb96 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -857,9 +857,9 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_TypedArrayInitialize) { |
ASSERT(byte_length % elementSize == 0); |
size_t length = byte_length / elementSize; |
- Handle<Object> length_obj = |
- isolate->factory()->NewNumber(static_cast<double>(length)); |
+ Handle<Object> length_obj = isolate->factory()->NewNumberFromSize(length); |
holder->set_length(*length_obj); |
+ |
Handle<ExternalArray> elements = |
isolate->factory()->NewExternalArray( |
static_cast<int>(length), arrayType, |