Index: runtime/vm/raw_object.cc |
diff --git a/runtime/vm/raw_object.cc b/runtime/vm/raw_object.cc |
index cc880e94ff1e6a9295ca3c5f13b4839657b9571c..8f92e9dfae0e1cd5d592891c5fb1eaa562b3969c 100644 |
--- a/runtime/vm/raw_object.cc |
+++ b/runtime/vm/raw_object.cc |
@@ -4,6 +4,7 @@ |
#include "vm/raw_object.h" |
+#include "vm/become.h" |
#include "vm/class_table.h" |
#include "vm/dart.h" |
#include "vm/freelist.h" |
@@ -177,6 +178,12 @@ intptr_t RawObject::SizeFromClass() const { |
instance_size = element->Size(); |
break; |
} |
+ case kForwardingCorpse: { |
+ uword addr = RawObject::ToAddr(this); |
+ ForwardingCorpse* element = reinterpret_cast<ForwardingCorpse*>(addr); |
+ instance_size = element->Size(); |
+ break; |
+ } |
default: { |
// Get the (constant) instance size out of the class object. |
// TODO(koda): Add Size(ClassTable*) interface to allow caching in loops. |
@@ -288,6 +295,12 @@ intptr_t RawObject::VisitPointers(ObjectPointerVisitor* visitor) { |
size = element->Size(); |
break; |
} |
+ case kForwardingCorpse: { |
+ uword addr = RawObject::ToAddr(this); |
+ ForwardingCorpse* forwarder = reinterpret_cast<ForwardingCorpse*>(addr); |
+ size = forwarder->Size(); |
+ break; |
+ } |
case kNullCid: |
size = Size(); |
break; |