Fix setColorUnlessGreen (#4300)
Previously this method effectively did nothing. Luckily, it was only used to reset color during freezing, which is fine: frozen objects do not use color.
This commit is contained in:
committed by
GitHub
parent
e66362d19e
commit
c43de55677
@@ -236,9 +236,9 @@ struct ContainerHeader {
|
||||
|
||||
inline void setColorUnlessGreen(unsigned color) {
|
||||
// TODO: do we need atomic color update?
|
||||
unsigned objectCount_ = objectCount_;
|
||||
if ((objectCount_ & CONTAINER_TAG_GC_COLOR_MASK) != CONTAINER_TAG_GC_GREEN)
|
||||
objectCount_ = (objectCount_ & ~CONTAINER_TAG_GC_COLOR_MASK) | color;
|
||||
unsigned objectCount = objectCount_;
|
||||
if ((objectCount & CONTAINER_TAG_GC_COLOR_MASK) != CONTAINER_TAG_GC_GREEN)
|
||||
objectCount_ = (objectCount & ~CONTAINER_TAG_GC_COLOR_MASK) | color;
|
||||
}
|
||||
|
||||
inline bool buffered() const {
|
||||
|
||||
Reference in New Issue
Block a user