| Index: src/objects.cc
|
| diff --git a/src/objects.cc b/src/objects.cc
|
| index 7afce5a885b8e038a5a40c28437eb2036c08ecd9..d92f4bc0763be62d08127eabc84b2f3aeedcbd2a 100644
|
| --- a/src/objects.cc
|
| +++ b/src/objects.cc
|
| @@ -14725,12 +14725,12 @@ Handle<Derived> HashTable<Derived, Shape, Key>::New(
|
| PretenureFlag pretenure) {
|
| DCHECK(0 <= at_least_space_for);
|
| DCHECK(!capacity_option || base::bits::IsPowerOfTwo32(at_least_space_for));
|
| - int capacity =
|
| - (capacity_option == USE_CUSTOM_MINIMUM_CAPACITY)
|
| - ? at_least_space_for
|
| - : isolate->serializer_enabled() && isolate->bootstrapper()->IsActive()
|
| - ? ComputeCapacityForSerialization(at_least_space_for)
|
| - : ComputeCapacity(at_least_space_for);
|
| +
|
| + int capacity = (capacity_option == USE_CUSTOM_MINIMUM_CAPACITY)
|
| + ? 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);
|
| }
|
|
|