Index: src/value-serializer.cc |
diff --git a/src/value-serializer.cc b/src/value-serializer.cc |
index c757650d04f44cb0d0b0b3f657b007e929001d3e..546609a22846f1e266054abe4be7a4c28b7faa7d 100644 |
--- a/src/value-serializer.cc |
+++ b/src/value-serializer.cc |
@@ -1454,8 +1454,10 @@ MaybeHandle<JSArrayBuffer> ValueDeserializer::ReadJSArrayBuffer() { |
const bool should_initialize = false; |
Handle<JSArrayBuffer> array_buffer = |
isolate_->factory()->NewJSArrayBuffer(SharedFlag::kNotShared, pretenure_); |
- JSArrayBuffer::SetupAllocatingData(array_buffer, isolate_, byte_length, |
- should_initialize); |
+ if (!JSArrayBuffer::SetupAllocatingData(array_buffer, isolate_, byte_length, |
+ should_initialize)) { |
+ return MaybeHandle<JSArrayBuffer>(); |
+ } |
memcpy(array_buffer->backing_store(), position_, byte_length); |
position_ += byte_length; |
AddObjectWithID(id, array_buffer); |