Revert "[heap] Initialize the heap tear down at the beginning of Isolate::Deinit"
This reverts commit 3f6686c2c5
.
Reason for revert: https://luci-milo.appspot.com/buildbot/client.v8/V8%20Mac64%20GC%20Stress/196
Original change's description:
> [heap] Initialize the heap tear down at the beginning of Isolate::Deinit
>
> Code in Isolate::Deinit may trigger a GC, e.g. wasm_engine()->TearDown.
> However, the gin platform in Chrome does not allow to post tasks within
> Isolate::Deinit. By initializing heap tear down at the beginning of
> Isolate::Deinit, we can make that no tasks are posted anymore within
> Isolate::Deinit.
>
> R=ulan@chromium.org
>
> Bug: chromium:826105
> Change-Id: I246c324aa23efe82cc8e7059a1cae5efca33a1b0
> Reviewed-on: https://chromium-review.googlesource.com/983598
> Commit-Queue: Andreas Haas <ahaas@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#52283}
TBR=ulan@chromium.org,ahaas@chromium.org
Change-Id: I98461449b16ae8dcf3b03c51daec92df9f5f6366
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:826105
Reviewed-on: https://chromium-review.googlesource.com/984193
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52284}
This commit is contained in:
parent
3f6686c2c5
commit
347b696083
@ -5991,10 +5991,8 @@ void Heap::RegisterExternallyReferencedObject(Object** object) {
|
||||
}
|
||||
}
|
||||
|
||||
void Heap::StartTearDown() { SetGCState(TEAR_DOWN); }
|
||||
|
||||
void Heap::TearDown() {
|
||||
DCHECK_EQ(gc_state_, TEAR_DOWN);
|
||||
SetGCState(TEAR_DOWN);
|
||||
#ifdef VERIFY_HEAP
|
||||
if (FLAG_verify_heap) {
|
||||
Verify();
|
||||
|
@ -978,9 +978,6 @@ class Heap {
|
||||
// Create ObjectStats if live_object_stats_ or dead_object_stats_ are nullptr.
|
||||
void CreateObjectStats();
|
||||
|
||||
// Sets the TearDown state, so no new GC tasks get posted.
|
||||
void StartTearDown();
|
||||
|
||||
// Destroys all memory allocated by the heap.
|
||||
void TearDown();
|
||||
|
||||
|
@ -2625,7 +2625,6 @@ void Isolate::ClearSerializerData() {
|
||||
void Isolate::Deinit() {
|
||||
TRACE_ISOLATE(deinit);
|
||||
|
||||
heap_.StartTearDown();
|
||||
debug()->Unload();
|
||||
|
||||
if (concurrent_recompilation_enabled()) {
|
||||
|
Loading…
Reference in New Issue
Block a user