Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index c10111aaa1ea93ff77c032717a28bedc2116da49..1c61d6cff1d39b2205f6c0c278a05d2e2cf1cfe0 100644 |
--- a/src/factory.cc |
+++ b/src/factory.cc |
@@ -748,7 +748,10 @@ Handle<JSFunction> Factory::NewFunctionFromSharedFunctionInfo( |
if (index > 0) { |
// Caching of optimized code enabled and optimized code found. |
- function_info->InstallFromOptimizedCodeMap(*result, index); |
+ FixedArray* literals = |
+ function_info->GetLiteralsFromOptimizedCodeMap(index); |
+ if (literals != NULL) result->set_literals(literals); |
+ result->ReplaceCode(function_info->GetCodeFromOptimizedCodeMap(index)); |
return result; |
} |
@@ -759,7 +762,7 @@ Handle<JSFunction> Factory::NewFunctionFromSharedFunctionInfo( |
function_info->allows_lazy_compilation() && |
!function_info->optimization_disabled() && |
!isolate()->DebuggerHasBreakPoints()) { |
- result->MarkForLazyRecompilation(); |
+ result->MarkForOptimization(); |
} |
return result; |
} |