| Index: src/objects.cc
|
| diff --git a/src/objects.cc b/src/objects.cc
|
| index d6db304b13bbb47fee94e8c9d78c2cac4dc3dbbc..08bfe4650d68f52fb6b5d63413d322f57d5738da 100644
|
| --- a/src/objects.cc
|
| +++ b/src/objects.cc
|
| @@ -19722,8 +19722,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 {
|
|
|