Reset progress bar of object to 0 when RecordWrites changes object color to grey.

BUG=v8:2423

Review URL: https://codereview.chromium.org/11308177

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13040 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
hpayer@chromium.org 2012-11-23 12:22:16 +00:00
parent a0582112f8
commit bbb6d45088

View File

@ -90,6 +90,10 @@ void IncrementalMarking::RecordWrites(HeapObject* obj) {
if (IsMarking()) {
MarkBit obj_bit = Marking::MarkBitFrom(obj);
if (Marking::IsBlack(obj_bit)) {
MemoryChunk* chunk = MemoryChunk::FromAddress(obj->address());
if (chunk->IsFlagSet(MemoryChunk::HAS_PROGRESS_BAR)) {
chunk->set_progress_bar(0);
}
BlackToGreyAndUnshift(obj, obj_bit);
RestartIfNotMarking();
}