| Index: src/x64/deoptimizer-x64.cc
|
| diff --git a/src/x64/deoptimizer-x64.cc b/src/x64/deoptimizer-x64.cc
|
| index c8fdfce26b58b3361e2a1de48c1a6f80b4216815..ceb28c8c864723cea4dff09e1d77ff5fd36a51e9 100644
|
| --- a/src/x64/deoptimizer-x64.cc
|
| +++ b/src/x64/deoptimizer-x64.cc
|
| @@ -46,11 +46,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.
|
| @@ -91,8 +94,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();
|
|
|