Index: src/value-serializer.cc |
diff --git a/src/value-serializer.cc b/src/value-serializer.cc |
index 51fdf2212b4f2a5420fd22b7f98a9a8d4e7401cc..faf44759ba93612cbd2adeb40a3e3eeacd566839 100644 |
--- a/src/value-serializer.cc |
+++ b/src/value-serializer.cc |
@@ -232,7 +232,7 @@ void ValueSerializer::WriteRawBytes(const void* source, size_t length) { |
Maybe<uint8_t*> ValueSerializer::ReserveRawBytes(size_t bytes) { |
size_t old_size = buffer_size_; |
size_t new_size = old_size + bytes; |
- if (new_size > buffer_capacity_) { |
+ if (V8_UNLIKELY(new_size > buffer_capacity_)) { |
bool ok; |
if (!ExpandBuffer(new_size).To(&ok)) { |
return Nothing<uint8_t*>(); |