| Index: src/mark-compact.cc
|
| diff --git a/src/mark-compact.cc b/src/mark-compact.cc
|
| index 1adb74745fa1258f352bc961fbc0ef26e65d8c1e..9d83d90fbfad8259f724c2baa8c1e2bd41ddb4ce 100644
|
| --- a/src/mark-compact.cc
|
| +++ b/src/mark-compact.cc
|
| @@ -1176,11 +1176,15 @@ class StaticMarkingVisitor : public StaticVisitorBase {
|
| Heap* heap = map->GetHeap();
|
| Code* code = reinterpret_cast<Code*>(object);
|
| if (FLAG_cleanup_code_caches_at_gc) {
|
| - TypeFeedbackCells* type_feedback_cells = code->type_feedback_cells();
|
| - for (int i = 0; i < type_feedback_cells->CellCount(); i++) {
|
| - ASSERT(type_feedback_cells->AstId(i)->IsSmi());
|
| - JSGlobalPropertyCell* cell = type_feedback_cells->Cell(i);
|
| - cell->set_value(TypeFeedbackCells::RawUninitializedSentinel(heap));
|
| + Object* raw_info = code->type_feedback_info();
|
| + if (raw_info->IsTypeFeedbackInfo()) {
|
| + TypeFeedbackCells* type_feedback_cells =
|
| + TypeFeedbackInfo::cast(raw_info)->type_feedback_cells();
|
| + for (int i = 0; i < type_feedback_cells->CellCount(); i++) {
|
| + ASSERT(type_feedback_cells->AstId(i)->IsSmi());
|
| + JSGlobalPropertyCell* cell = type_feedback_cells->Cell(i);
|
| + cell->set_value(TypeFeedbackCells::RawUninitializedSentinel(heap));
|
| + }
|
| }
|
| }
|
| code->CodeIterateBody<StaticMarkingVisitor>(heap);
|
|
|