Index: src/ia32/deoptimizer-ia32.cc |
diff --git a/src/ia32/deoptimizer-ia32.cc b/src/ia32/deoptimizer-ia32.cc |
index c9ecaccd2daf318ffd3fbcaafca193a0e2965c6c..5795b18e3424c87e8eed3384fe00e79c915f305d 100644 |
--- a/src/ia32/deoptimizer-ia32.cc |
+++ b/src/ia32/deoptimizer-ia32.cc |
@@ -114,17 +114,19 @@ void Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(Handle<Code> code) { |
} |
-void Deoptimizer::DeoptimizeFunction(JSFunction* function) { |
- if (!function->IsOptimized()) return; |
+void Deoptimizer::DeoptimizeFunctionWithPreparedFunctionList( |
+ JSFunction* function) { |
+ Isolate* isolate = function->GetIsolate(); |
+ HandleScope scope(isolate); |
+ AssertNoAllocation no_allocation; |
+ |
+ ASSERT(function->IsOptimized()); |
+ ASSERT(function->FunctionsInFunctionListShareSameCode()); |
// The optimized code is going to be patched, so we cannot use it |
// any more. Play safe and reset the whole cache. |
function->shared()->ClearOptimizedCodeMap(); |
- Isolate* isolate = function->GetIsolate(); |
- HandleScope scope(isolate); |
- AssertNoAllocation no_allocation; |
- |
// Get the optimized code. |
Code* code = function->code(); |
Address code_start_address = code->instruction_start(); |