Index: src/deoptimizer.cc |
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc |
index 2b02bae78add5efc53e6ff658515799da8d2ebc9..04439f317cc5593160b070a2d7ec13f43db728d5 100644 |
--- a/src/deoptimizer.cc |
+++ b/src/deoptimizer.cc |
@@ -342,7 +342,8 @@ void Deoptimizer::DeoptimizeMarkedCodeForContext(Context* context) { |
// Unlink this function and evict from optimized code map. |
SharedFunctionInfo* shared = function->shared(); |
function->set_code(shared->code()); |
- shared->EvictFromOptimizedCodeMap(code, "deoptimized function"); |
+ shared->EvictFromOptimizedCodeMap(function->context()->native_context(), |
+ "deoptimized function"); |
if (FLAG_trace_deopt) { |
CodeTracer::Scope scope(code->GetHeap()->isolate()->GetCodeTracer()); |