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