Commit 9024b413 authored by Dominik Inführ's avatar Dominik Inführ Committed by Commit Bot

[execution][heap] Reset main_thread_local_isolate_ after heap tear down

Reset main_thread_local_isolate_ only after Heap::TearDown was executed.
main_thread_local_isolate_ is still needed in there for e.g.
HandleBase::IsDereferenceAllowed in MemoryMeasurement.

Bug: chromium:1150867, v8:10315
Change-Id: Ia1ebfd561b7a3ab2d346f0c17b239f75ad77471f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2549969Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71310}
parent 7f607cfd
......@@ -3110,9 +3110,12 @@ void Isolate::Deinit() {
// This stops cancelable tasks (i.e. concurrent marking tasks)
cancelable_task_manager()->CancelAndWait();
main_thread_local_isolate_.reset();
main_thread_local_isolate_->heap()->FreeLinearAllocationArea();
heap_.TearDown();
main_thread_local_isolate_.reset();
FILE* logfile = logger_->TearDownAndGetLogFile();
if (logfile != nullptr) base::Fclose(logfile);
......
......@@ -55,6 +55,7 @@ bool HandleBase::IsDereferenceAllowed() const {
// LocalHeap.
DCHECK_EQ(ThreadId::Current(), isolate->thread_id());
local_heap = isolate->main_thread_local_heap();
DCHECK_NOT_NULL(local_heap);
}
// Local heap can't access handles when parked
......
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