Commit 047977c5 authored by hpayer's avatar hpayer Committed by Commit bot

[heap] Abort black allocation when aborting incremental marking.

BUG=chromium:630386

Review-Url: https://codereview.chromium.org/2337943002
Cr-Commit-Position: refs/heads/master@{#39380}
parent 97b330ad
......@@ -626,6 +626,16 @@ void IncrementalMarking::FinishBlackAllocation() {
}
}
void IncrementalMarking::AbortBlackAllocation() {
for (Page* page : *heap()->old_space()) {
page->ReleaseBlackAreaEndMarkerMap();
}
if (FLAG_trace_incremental_marking) {
heap()->isolate()->PrintWithTimestamp(
"[IncrementalMarking] Black allocation aborted\n");
}
}
void IncrementalMarking::MarkRoots() {
DCHECK(!finalize_marking_completed_);
DCHECK(IsMarking());
......
......@@ -225,6 +225,8 @@ class IncrementalMarking {
void StartBlackAllocationForTesting() { StartBlackAllocation(); }
void AbortBlackAllocation();
private:
class Observer : public AllocationObserver {
public:
......
......@@ -801,6 +801,7 @@ void MarkCompactCollector::Prepare() {
// Clear marking bits if incremental marking is aborted.
if (was_marked_incrementally_ && heap_->ShouldAbortIncrementalMarking()) {
heap()->incremental_marking()->Stop();
heap()->incremental_marking()->AbortBlackAllocation();
ClearMarkbits();
AbortWeakCollections();
AbortWeakCells();
......
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