Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index 143099cfb8f5235a25e18b9a493aaddfdba3c6a0..e8a9f26a5c08951923c752cfc451a73c3be4a785 100644 |
--- a/src/factory.cc |
+++ b/src/factory.cc |
@@ -537,6 +537,10 @@ Handle<JSFunction> Factory::NewFunctionFromSharedFunctionInfo( |
: isolate()->strict_mode_function_map(), |
pretenure); |
+ if (function_info->ic_age() != isolate()->heap()->global_ic_age()) { |
+ function_info->ResetForNewContext(isolate()->heap()->global_ic_age()); |
+ } |
+ |
result->set_context(*context); |
if (!function_info->bound()) { |
int number_of_literals = function_info->num_literals(); |