Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 418df559da2480230dd6e3b6e5d813a6b146f6d9..3f92c595c7fd899bdc7d80b5c599d420691ac849 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -5326,8 +5326,7 @@ bool Code::IsWeakObjectInOptimizedCode(Object* object) { |
} else if (object->IsPropertyCell()) { |
object = PropertyCell::cast(object)->value(); |
} |
- if (object->IsJSObject() || object->IsJSProxy()) { |
- // JSProxy is handled like JSObject because it can morph into one. |
+ if (object->IsJSReceiver()) { |
return FLAG_weak_embedded_objects_in_optimized_code; |
} |
if (object->IsFixedArray()) { |