Commit 6ff9f24b authored by Ulan Degenbaev's avatar Ulan Degenbaev Committed by Commit Bot

[heap] Disable GC during isolate initialization

Bug: chromium:1188212
Change-Id: I2c01544e5ff114d4fbdb853a344eb2b6250ee7ab
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2763881Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73437}
parent ab22d98c
......@@ -1524,6 +1524,14 @@ Heap::DevToolsTraceEventScope::~DevToolsTraceEventScope() {
bool Heap::CollectGarbage(AllocationSpace space,
GarbageCollectionReason gc_reason,
const v8::GCCallbackFlags gc_callback_flags) {
if (V8_UNLIKELY(!deserialization_complete_)) {
// During isolate initialization heap always grows. GC is only requested
// if a new page allocation fails. In such a case we should crash with
// an out-of-memory instead of performing GC because the prologue/epilogue
// callbacks may see objects that are not yet deserialized.
CHECK(always_allocate());
FatalProcessOutOfMemory("GC during deserialization");
}
const char* collector_reason = nullptr;
GarbageCollector collector = SelectGarbageCollector(space, &collector_reason);
is_current_gc_forced_ = gc_callback_flags & v8::kGCCallbackFlagForced ||
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment