Chromium Code Reviews| Index: src/objects-visiting-inl.h |
| diff --git a/src/objects-visiting-inl.h b/src/objects-visiting-inl.h |
| index 6c3c9d44fe318d77c141a68dc6d562d86563aceb..ccd76a0fd63df3623c95fdda89dfc1ee288c890e 100644 |
| --- a/src/objects-visiting-inl.h |
| +++ b/src/objects-visiting-inl.h |
| @@ -233,8 +233,12 @@ template<typename StaticVisitor> |
| void StaticMarkingVisitor<StaticVisitor>::VisitEmbeddedPointer( |
| Heap* heap, RelocInfo* rinfo) { |
| ASSERT(rinfo->rmode() == RelocInfo::EMBEDDED_OBJECT); |
| - ASSERT(!rinfo->target_object()->IsConsString()); |
| HeapObject* object = HeapObject::cast(rinfo->target_object()); |
| + if (object->IsConsString() && ConsString::cast(object)->IsFlat()) { |
|
Michael Starzinger
2013/06/20 10:04:13
I don't think this is the correct place to do the
|
| + // Short-circuit flattened cons-strings. |
| + object = ConsString::cast(object)->first(); |
| + rinfo->set_target_object(object); |
| + } |
| if (!FLAG_weak_embedded_maps_in_optimized_code || !FLAG_collect_maps || |
| rinfo->host()->kind() != Code::OPTIMIZED_FUNCTION || |
| !object->IsMap() || !Map::cast(object)->CanTransition()) { |