Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index cb22670617de0f957157cf4c6a12ba7ee6395b49..5cd2d287234bf4f59030b66cad9b47dca89d190a 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -7973,6 +7973,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NotifyDeoptimized) { |
JavaScriptFrame* frame = it.frame(); |
RUNTIME_ASSERT(frame->function()->IsJSFunction()); |
Handle<JSFunction> function(JSFunction::cast(frame->function()), isolate); |
+ Handle<Code> optimized_code(function->code()); |
RUNTIME_ASSERT(type != Deoptimizer::EAGER || function->IsOptimized()); |
// Avoid doing too much work when running with --always-opt and keep |
@@ -8011,7 +8012,8 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NotifyDeoptimized) { |
Deoptimizer::DeoptimizeFunction(*function); |
} |
// Flush optimized code cache for this function. |
Michael Starzinger
2013/05/13 14:26:46
The comment is outdated.
danno
2013/05/13 15:23:10
Done.
|
- function->shared()->ClearOptimizedCodeMap("notify deoptimized"); |
+ function->shared()->EvictFromOptimizedCodeMap(*optimized_code, |
+ "notify deoptimized"); |
return isolate->heap()->undefined_value(); |
} |