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

Unified Diff: src/heap/incremental-marking.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/heap.cc ('k') | src/heap/incremental-marking.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/incremental-marking.h
diff --git a/src/heap/incremental-marking.h b/src/heap/incremental-marking.h
index e0900c1ed398bd7fb2500be3223fd29267a63f26..48e03d289da915d00448f769504d5094bba5a9cc 100644
--- a/src/heap/incremental-marking.h
+++ b/src/heap/incremental-marking.h
@@ -186,16 +186,16 @@ class V8_EXPORT_PRIVATE IncrementalMarking {
static void TransferMark(Heap* heap, HeapObject* from, HeapObject* to);
V8_INLINE static void TransferColor(HeapObject* from, HeapObject* to) {
- if (ObjectMarking::IsBlack(to)) {
+ if (ObjectMarking::IsBlack(to, MarkingState::Internal(to))) {
DCHECK(to->GetHeap()->incremental_marking()->black_allocation());
return;
}
- DCHECK(ObjectMarking::IsWhite(to));
- if (ObjectMarking::IsGrey(from)) {
- ObjectMarking::WhiteToGrey(to);
- } else if (ObjectMarking::IsBlack(from)) {
- ObjectMarking::WhiteToBlack(to);
+ DCHECK(ObjectMarking::IsWhite(to, MarkingState::Internal(to)));
+ if (ObjectMarking::IsGrey(from, MarkingState::Internal(from))) {
+ ObjectMarking::WhiteToGrey(to, MarkingState::Internal(to));
+ } else if (ObjectMarking::IsBlack(from, MarkingState::Internal(from))) {
+ ObjectMarking::WhiteToBlack(to, MarkingState::Internal(to));
}
}
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/incremental-marking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698