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

Unified Diff: src/heap/objects-visiting-inl.h

Issue 2770253002: [heap] Enforce explicit MarkingState (Closed)
Patch Set: rebase Created 3 years, 9 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
« no previous file with comments | « src/heap/object-stats.cc ('k') | src/heap/scavenger.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/objects-visiting-inl.h
diff --git a/src/heap/objects-visiting-inl.h b/src/heap/objects-visiting-inl.h
index 493dce7179c54125f98f614058990679556db2b6..b6c20c00e06af5ebef090ac604479e1a3567c7d7 100644
--- a/src/heap/objects-visiting-inl.h
+++ b/src/heap/objects-visiting-inl.h
@@ -333,7 +333,7 @@ void StaticMarkingVisitor<StaticVisitor>::VisitWeakCell(Map* map,
// contain smi zero.
if (weak_cell->next_cleared() && !weak_cell->cleared()) {
HeapObject* value = HeapObject::cast(weak_cell->value());
- if (ObjectMarking::IsBlackOrGrey(value)) {
+ if (ObjectMarking::IsBlackOrGrey(value, MarkingState::Internal(value))) {
// Weak cells with live values are directly processed here to reduce
// the processing time of weak cells during the main GC pause.
Object** slot = HeapObject::RawField(weak_cell, WeakCell::kValueOffset);
@@ -522,7 +522,8 @@ bool StaticMarkingVisitor<StaticVisitor>::IsFlushable(Heap* heap,
// Code is either on stack, in compilation cache or referenced
// by optimized version of function.
- if (ObjectMarking::IsBlackOrGrey(function->code())) {
+ if (ObjectMarking::IsBlackOrGrey(function->code(),
+ MarkingState::Internal(function->code()))) {
return false;
}
@@ -545,7 +546,8 @@ bool StaticMarkingVisitor<StaticVisitor>::IsFlushable(
Heap* heap, SharedFunctionInfo* shared_info) {
// Code is either on stack, in compilation cache or referenced
// by optimized version of function.
- if (ObjectMarking::IsBlackOrGrey(shared_info->code())) {
+ if (ObjectMarking::IsBlackOrGrey(
+ shared_info->code(), MarkingState::Internal(shared_info->code()))) {
return false;
}
« no previous file with comments | « src/heap/object-stats.cc ('k') | src/heap/scavenger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698