Add missing TPH guards
These guards are needed since the third part heaps don't use the deserialization reservation system. Bug: v8:9533 Change-Id: I0e8bd7928581979bed15abdfaf639c9fdfc8a30f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2030908 Commit-Queue: Steve Blackburn <steveblackburn@google.com> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#66108}
This commit is contained in:
parent
02e5787389
commit
e63ab1040f
@ -140,6 +140,7 @@ void DeserializerAllocator::DecodeReservation(
|
||||
}
|
||||
|
||||
bool DeserializerAllocator::ReserveSpace() {
|
||||
DCHECK(!V8_ENABLE_THIRD_PARTY_HEAP_BOOL);
|
||||
#ifdef DEBUG
|
||||
for (int i = 0; i < kNumberOfSpaces; ++i) {
|
||||
DCHECK_GT(reservations_[i].size(), 0);
|
||||
|
@ -33,8 +33,9 @@ ObjectDeserializer::DeserializeSharedFunctionInfo(
|
||||
|
||||
MaybeHandle<HeapObject> ObjectDeserializer::Deserialize(Isolate* isolate) {
|
||||
Initialize(isolate);
|
||||
|
||||
#if !V8_ENABLE_THIRD_PARTY_HEAP_BOOL
|
||||
if (!allocator()->ReserveSpace()) return MaybeHandle<HeapObject>();
|
||||
#endif
|
||||
|
||||
DCHECK(deserializing_user_code());
|
||||
HandleScope scope(isolate);
|
||||
|
@ -31,9 +31,11 @@ MaybeHandle<Object> PartialDeserializer::Deserialize(
|
||||
Isolate* isolate, Handle<JSGlobalProxy> global_proxy,
|
||||
v8::DeserializeEmbedderFieldsCallback embedder_fields_deserializer) {
|
||||
Initialize(isolate);
|
||||
#if !V8_ENABLE_THIRD_PARTY_HEAP_BOOL
|
||||
if (!allocator()->ReserveSpace()) {
|
||||
V8::FatalProcessOutOfMemory(isolate, "PartialDeserializer");
|
||||
}
|
||||
#endif
|
||||
|
||||
AddAttachedObject(global_proxy);
|
||||
|
||||
|
@ -16,9 +16,11 @@ namespace internal {
|
||||
void StartupDeserializer::DeserializeInto(Isolate* isolate) {
|
||||
Initialize(isolate);
|
||||
|
||||
#if !V8_ENABLE_THIRD_PARTY_HEAP_BOOL
|
||||
if (!allocator()->ReserveSpace()) {
|
||||
V8::FatalProcessOutOfMemory(isolate, "StartupDeserializer");
|
||||
}
|
||||
#endif
|
||||
|
||||
// No active threads.
|
||||
DCHECK_NULL(isolate->thread_manager()->FirstThreadStateInUse());
|
||||
|
Loading…
Reference in New Issue
Block a user