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

Unified Diff: src/objects-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/spaces-inl.h ('k') | test/cctest/heap/test-compaction.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 4a5f0f963daef8d0676f34c61fe277e563a5a056..63abfbc6729cdf7d6232c58dcd4ece00c73edf0c 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -2005,9 +2005,10 @@ void WeakCell::initialize(HeapObject* val) {
// We just have to execute the generational barrier here because we never
// mark through a weak cell and collect evacuation candidates when we process
// all weak cells.
- WriteBarrierMode mode = ObjectMarking::IsBlack(this)
- ? UPDATE_WRITE_BARRIER
- : UPDATE_WEAK_WRITE_BARRIER;
+ WriteBarrierMode mode =
+ ObjectMarking::IsBlack(this, MarkingState::Internal(this))
+ ? UPDATE_WRITE_BARRIER
+ : UPDATE_WEAK_WRITE_BARRIER;
CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kValueOffset, val, mode);
}
« no previous file with comments | « src/heap/spaces-inl.h ('k') | test/cctest/heap/test-compaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698