Index: src/mips/deoptimizer-mips.cc |
diff --git a/src/mips/deoptimizer-mips.cc b/src/mips/deoptimizer-mips.cc |
index e8ed9ccf7bf0c0c7e040c1be603973f7cb513bb1..a134f5962f4ea47272c6ccf4e6e5608475d6281f 100644 |
--- a/src/mips/deoptimizer-mips.cc |
+++ b/src/mips/deoptimizer-mips.cc |
@@ -42,11 +42,14 @@ int Deoptimizer::patch_size() { |
} |
-void Deoptimizer::DeoptimizeFunction(JSFunction* function) { |
- HandleScope scope; |
+void Deoptimizer::DeoptimizeFunctionWithPreparedFunctionList( |
+ JSFunction* function) { |
+ Isolate* isolate = function->GetIsolate(); |
+ HandleScope scope(isolate); |
AssertNoAllocation no_allocation; |
- if (!function->IsOptimized()) return; |
+ 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. |
@@ -87,8 +90,6 @@ void Deoptimizer::DeoptimizeFunction(JSFunction* function) { |
#endif |
} |
- Isolate* isolate = code->GetIsolate(); |
- |
// Add the deoptimizing code to the list. |
DeoptimizingCodeListNode* node = new DeoptimizingCodeListNode(code); |
DeoptimizerData* data = isolate->deoptimizer_data(); |