Index: src/builtins.cc |
diff --git a/src/builtins.cc b/src/builtins.cc |
index 95673c8bc1a6e0e44b60b6d3bb76a19a68887261..dff9d41fde5469d452f6e951d1d89d138d726e8b 100644 |
--- a/src/builtins.cc |
+++ b/src/builtins.cc |
@@ -1781,7 +1781,7 @@ |
isolate->set_context(args.target()->context()); |
Handle<Object> number_length; |
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, number_length, |
- Object::ToInteger(isolate, length)); |
+ Object::ToNumber(length)); |
size_t byte_length; |
if (!TryNumberToSize(isolate, *number_length, &byte_length)) { |
THROW_NEW_ERROR_RETURN_FAILURE( |