Reland : Preempt ConcurrentMarking tasks ASAP when cancelling marking.

Reland reason : the failure was

Check failed: IsGlobalEmpty().
    v8::base::debug::StackTrace::StackTrace()
    v8::platform::(anonymous namespace)::PrintStackTrace()
    V8_Fatal(char const*, int, char const*, ...)
    v8::internal::Worklist<v8::internal::HeapObject*, 64>::~Worklist()
    v8::internal::MarkCompactCollector::~MarkCompactCollector()
    v8::internal::MarkCompactCollector::~MarkCompactCollector()
    v8::internal::Heap::TearDown()
    v8::internal::Isolate::Deinit()
    v8::internal::Isolate::TearDown()
    v8::Shell::OnExit(v8::Isolate*)
    v8::Shell::Main(int, char**)

this is believed to be fixed by the change to flush the shared
worklist to global in
https://chromium-review.googlesource.com/c/v8/v8/+/925267

Follow-up to https://chromium-review.googlesource.com/c/v8/v8/+/924867

(cherry picked from commit 8b53b9d908)

Bug: chromium:812178
Change-Id: I796204656e2c89e7efecda2c275a1888c31aba7b
Reviewed-on: https://chromium-review.googlesource.com/925268
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51430}
This commit is contained in:
Gabriel Charette 2018-02-21 13:34:35 +01:00 committed by Commit Bot
parent b64afff338
commit 7badc3f0c4

View File

@ -866,9 +866,7 @@ void MarkCompactCollector::Prepare() {
if (was_marked_incrementally_ && heap_->ShouldAbortIncrementalMarking()) {
heap()->incremental_marking()->Stop();
heap()->incremental_marking()->AbortBlackAllocation();
// TODO(gab): PREEMPT_TASKS here in a follow-up CL.
FinishConcurrentMarking(
ConcurrentMarking::StopRequest::COMPLETE_ONGOING_TASKS);
FinishConcurrentMarking(ConcurrentMarking::StopRequest::PREEMPT_TASKS);
heap()->incremental_marking()->Deactivate();
ClearMarkbits();
AbortWeakCollections();