Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Unified Diff: src/builtins.cc

Issue 1497163002: [es6] Match ArrayBuffer constructor behavior of Firefox. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698