Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index eae44549aa061d1b855e84b6222e9f7de02b49bf..8bb95c518c79327fe1548fcdf8cf017a9004cd16 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -13346,7 +13346,9 @@ |
int capacity = (capacity_option == USE_CUSTOM_MINIMUM_CAPACITY) |
? at_least_space_for |
- : ComputeCapacity(at_least_space_for); |
+ : isolate->creating_default_snapshot() |
+ ? ComputeCapacityForSerialization(at_least_space_for) |
+ : ComputeCapacity(at_least_space_for); |
if (capacity > HashTable::kMaxCapacity) { |
v8::internal::Heap::FatalProcessOutOfMemory("invalid table size", true); |
} |