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