| Index: src/objects.cc
|
| diff --git a/src/objects.cc b/src/objects.cc
|
| index e10b4a1edaf454cda22d670cc2dd3411425e47df..2901840af92fbe0b1cd995ba1129a4cb4024befa 100644
|
| --- a/src/objects.cc
|
| +++ b/src/objects.cc
|
| @@ -19485,7 +19485,12 @@ bool JSArrayBuffer::SetupAllocatingData(Handle<JSArrayBuffer> array_buffer,
|
| data = isolate->array_buffer_allocator()->AllocateUninitialized(
|
| allocated_length);
|
| }
|
| - if (data == NULL) return false;
|
| + if (data == NULL) {
|
| + isolate->counters()->array_buffer_new_size_failures()->AddSample(
|
| + sizeof(uint64_t) * kBitsPerByte -
|
| + base::bits::CountLeadingZeros64(allocated_length));
|
| + return false;
|
| + }
|
| } else {
|
| data = NULL;
|
| }
|
|
|