Chromium Code Reviews| Index: runtime/vm/object.cc |
| =================================================================== |
| --- runtime/vm/object.cc (revision 40915) |
| +++ runtime/vm/object.cc (working copy) |
| @@ -1745,7 +1745,15 @@ |
| intptr_t size = src.raw()->Size(); |
| RawObject* raw_obj = Object::Allocate(cls.id(), size, space); |
| NoGCScope no_gc; |
| + // Newly allocated objects are white ... |
| + // TODO(koda): This will trip when we start allocating black. |
| + // Update unmarking code below at that point. |
| + ASSERT(!raw_obj->IsMarked()); |
| memmove(raw_obj->ptr(), src.raw()->ptr(), size); |
| + // ... so ensure clone is too (see issue 21236). |
| + if (raw_obj->IsMarked()) { |
| + raw_obj->ClearMarkBit(); |
| + } |
| if ((space == Heap::kOld) && !raw_obj->IsRemembered()) { |
|
Ivan Posva
2014/10/06 05:18:53
We should discuss this condition in person. I am n
koda
2014/10/06 05:35:35
Agreed.
In general, this method seems awfully tri
|
| StoreBufferUpdateVisitor visitor(Isolate::Current(), raw_obj); |
| raw_obj->VisitPointers(&visitor); |