Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 612267b878d20eb4987a27cd2116b7335e0d342d..ad7aeffd4e1887ffe6e01d57a5b36b7ce3bb7b64 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -10659,6 +10659,10 @@ void JSFunction::StartInobjectSlackTracking() { |
void SharedFunctionInfo::ResetForNewContext(int new_ic_age) { |
+ code()->ClearInlineCaches(); |
+ // If we clear ICs, we need to clear the type feedback vector too, since |
+ // CallICs are synced with a feedback vector slot. |
+ ClearTypeFeedbackInfo(); |
set_ic_age(new_ic_age); |
if (code()->kind() == Code::FUNCTION) { |
code()->set_profiler_ticks(0); |