Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 28163662b5dc32885b28ce51158ea8058a6d8a04..bbd4faa4484d04e65a3c3724c2a7c43fdd0cac4c 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -14558,7 +14558,9 @@ Handle<Derived> HashTable<Derived, Shape, Key>::New( |
DCHECK(!capacity_option || base::bits::IsPowerOfTwo32(at_least_space_for)); |
int capacity = (capacity_option == USE_CUSTOM_MINIMUM_CAPACITY) |
? at_least_space_for |
- : ComputeCapacity(at_least_space_for); |
+ : isolate->serializer_enabled() |
+ ? ComputeCapacityForSerialization(at_least_space_for) |
+ : ComputeCapacity(at_least_space_for); |
if (capacity > HashTable::kMaxCapacity) { |
v8::internal::Heap::FatalProcessOutOfMemory("invalid table size", true); |
} |