| Index: src/objects.cc
|
| diff --git a/src/objects.cc b/src/objects.cc
|
| index f40dc1e007d58b0ddc36cf753bdbedaf53fbb4c5..7c65a8ce244ad6ae0b37a337d236ca494e6e555a 100644
|
| --- a/src/objects.cc
|
| +++ b/src/objects.cc
|
| @@ -19561,8 +19561,9 @@ bool JSArrayBuffer::SetupAllocatingData(Handle<JSArrayBuffer> array_buffer,
|
| // Prevent creating array buffers when serializing.
|
| DCHECK(!isolate->serializer_enabled());
|
| if (allocated_length != 0) {
|
| - isolate->counters()->array_buffer_big_allocations()->AddSample(
|
| - ConvertToMb(allocated_length));
|
| + if (allocated_length >= MB)
|
| + isolate->counters()->array_buffer_big_allocations()->AddSample(
|
| + ConvertToMb(allocated_length));
|
| if (initialize) {
|
| data = isolate->array_buffer_allocator()->Allocate(allocated_length);
|
| } else {
|
|
|