| Index: runtime/vm/object.cc
|
| ===================================================================
|
| --- runtime/vm/object.cc (revision 17755)
|
| +++ runtime/vm/object.cc (working copy)
|
| @@ -1300,14 +1300,15 @@
|
| }
|
|
|
|
|
| -class StoreBufferObjectPointerVisitor : public ObjectPointerVisitor {
|
| +class StoreBufferUpdateVisitor : public ObjectPointerVisitor {
|
| public:
|
| - explicit StoreBufferObjectPointerVisitor(Isolate* isolate) :
|
| - ObjectPointerVisitor(isolate) {
|
| - }
|
| + explicit StoreBufferUpdateVisitor(Isolate* isolate) :
|
| + ObjectPointerVisitor(isolate) { }
|
| +
|
| void VisitPointers(RawObject** first, RawObject** last) {
|
| for (RawObject** curr = first; curr <= last; ++curr) {
|
| - if ((*curr)->IsNewObject()) {
|
| + RawObject* raw_obj = *curr;
|
| + if (raw_obj->IsHeapObject() && raw_obj->IsNewObject()) {
|
| uword ptr = reinterpret_cast<uword>(curr);
|
| isolate()->store_buffer()->AddPointer(ptr);
|
| }
|
| @@ -1315,7 +1316,7 @@
|
| }
|
|
|
| private:
|
| - DISALLOW_COPY_AND_ASSIGN(StoreBufferObjectPointerVisitor);
|
| + DISALLOW_COPY_AND_ASSIGN(StoreBufferUpdateVisitor);
|
| };
|
|
|
|
|
| @@ -1337,7 +1338,7 @@
|
| NoGCScope no_gc;
|
| memmove(raw_obj->ptr(), src.raw()->ptr(), size);
|
| if (space == Heap::kOld) {
|
| - StoreBufferObjectPointerVisitor visitor(Isolate::Current());
|
| + StoreBufferUpdateVisitor visitor(Isolate::Current());
|
| raw_obj->VisitPointers(&visitor);
|
| }
|
| return raw_obj;
|
|
|