Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(633)

Unified Diff: src/heap/heap.cc

Issue 1314853002: [heap] Make the current GCCallbackFlags are part of {Heap}. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 455b01e3f763b2979333363587ac01059c2d3319..404fa5f4bbba1c988cf0871cb69ba4ebec589866 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -133,6 +133,7 @@ Heap::Heap()
promotion_queue_(this),
configured_(false),
current_gc_flags_(Heap::kNoGCFlags),
+ current_gc_callback_flags_(GCCallbackFlags::kNoGCCallbackFlags),
external_string_table_(this),
chunks_queued_for_free_(NULL),
pending_unmap_job_semaphore_(0),
@@ -742,7 +743,7 @@ void Heap::HandleGCRequest() {
if (incremental_marking()->request_type() ==
IncrementalMarking::COMPLETE_MARKING) {
CollectAllGarbage(current_gc_flags(), "GC interrupt",
- incremental_marking()->CallbackFlags());
+ current_gc_callback_flags());
return;
}
DCHECK(FLAG_overapproximate_weak_closure);
@@ -951,7 +952,7 @@ bool Heap::CollectGarbage(GarbageCollector collector, const char* gc_reason,
// generator needs incremental marking to stay off after it aborted.
if (!ShouldAbortIncrementalMarking() && incremental_marking()->IsStopped() &&
incremental_marking()->ShouldActivateEvenWithoutIdleNotification()) {
- incremental_marking()->Start(kNoGCFlags, kNoGCCallbackFlags, "GC epilogue");
+ StartIncrementalMarking(kNoGCFlags, kNoGCCallbackFlags, "GC epilogue");
}
return next_gc_likely_to_collect_more;
@@ -982,7 +983,9 @@ void Heap::StartIncrementalMarking(int gc_flags,
const GCCallbackFlags gc_callback_flags,
const char* reason) {
DCHECK(incremental_marking()->IsStopped());
- incremental_marking()->Start(gc_flags, gc_callback_flags, reason);
+ set_current_gc_flags(gc_flags);
+ set_current_gc_callback_flags(gc_callback_flags);
+ incremental_marking()->Start(reason);
}
« src/heap/heap.h ('K') | « src/heap/heap.h ('k') | src/heap/incremental-marking.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698