[es6] Match ArrayBuffer constructor behavior of Firefox.
We choose to deliberately violate the ES2015 specification and implement the ArrayBuffer constructor in a way that matches Firefox and Safari instead. BUG=v8:4592 LOG=n Review URL: https://codereview.chromium.org/1497163002 Cr-Commit-Position: refs/heads/master@{#32597}
This commit is contained in:
parent
832424cf73
commit
8aae841ce2
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user