Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index 434ad8fbd583ffefc8560f4ff2f0142f9a817790..849ddbf9910a388d2610cc7b9e45ac189a21e0dd 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -676,7 +676,7 @@ bool Runtime::SetupArrayBuffer(Isolate* isolate, |
array_buffer->set_backing_store(data); |
Handle<Object> byte_length = |
- isolate->factory()->NewNumber(static_cast<double>(allocated_length)); |
+ isolate->factory()->NewNumberFromSize(allocated_length); |
CHECK(byte_length->IsSmi() || byte_length->IsHeapNumber()); |
array_buffer->set_byte_length(*byte_length); |
return true; |