Index: src/type-info.h |
diff --git a/src/type-info.h b/src/type-info.h |
index 6866da2d1abb4eec433121777dec18cee63c859b..bd275e671a8c62809d6ab4c40880e481ceecb531 100644 |
--- a/src/type-info.h |
+++ b/src/type-info.h |
@@ -67,9 +67,12 @@ class TypeFeedbackOracle: public ZoneObject { |
template <class T> |
void CollectReceiverTypes(T* obj, SmallMapList* types); |
- static bool CanRetainOtherContext(Map* map, Context* native_context); |
- static bool CanRetainOtherContext(JSFunction* function, |
- Context* native_context); |
+ static bool IsRelevantFeedback(Map* map, Context* native_context) { |
+ Object* constructor = map->GetConstructor(); |
+ return !constructor->IsJSFunction() || |
+ JSFunction::cast(constructor)->context()->native_context() == |
+ native_context; |
+ } |
Handle<JSFunction> GetCallTarget(FeedbackVectorICSlot slot); |
Handle<AllocationSite> GetCallAllocationSite(FeedbackVectorICSlot slot); |