Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index c0c87a457d3ad870d701f6747d23a13e644fd741..8bccd6b4ce690961aa8d57f54cd41c3752d432f6 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -8763,7 +8763,9 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_CompileForOnStackReplacement) { |
PrintF(" at AST id %d]\n", ast_id.ToInt()); |
} |
- function->ReplaceCode(function->shared()->code()); |
+ if (!function->IsOptimized()) { |
+ function->ReplaceCode(function->shared()->code()); |
+ } |
return NULL; |
} |