Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 4c98296d8a151c3b30092665364cb71bd67dd9a9..3d4a3d4b0522d3eca4022b5c4539825ec50a90f7 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -5260,12 +5260,9 @@ bool Code::IsWeakObjectInOptimizedCode(Object* object) { |
if (object->IsJSReceiver()) { |
return FLAG_weak_embedded_objects_in_optimized_code; |
} |
- if (object->IsFixedArray()) { |
+ if (object->IsContext()) { |
// Contexts of inlined functions are embedded in optimized code. |
- Map* map = HeapObject::cast(object)->map(); |
- Heap* heap = map->GetHeap(); |
- return FLAG_weak_embedded_objects_in_optimized_code && |
- map == heap->function_context_map(); |
+ return FLAG_weak_embedded_objects_in_optimized_code; |
} |
return false; |
} |