Index: runtime/vm/compiler.cc |
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc |
index b02e904f6d0045ddd8adf8ccbd1ec0816a232b51..9dd9ea0593b6a524990661507f00a2433160a36f 100644 |
--- a/runtime/vm/compiler.cc |
+++ b/runtime/vm/compiler.cc |
@@ -758,7 +758,9 @@ static bool CompileParsedFunctionHelper(CompilationPipeline* pipeline, |
if (optimized) { |
// We may not have previous code if 'always_optimize' is set. |
if ((osr_id == Isolate::kNoDeoptId) && function.HasCode()) { |
- CodePatcher::PatchEntry(Code::Handle(function.CurrentCode())); |
+ CodePatcher::PatchEntry( |
+ Code::Handle(function.CurrentCode()), |
+ Code::Handle(StubCode::FixCallersTarget_entry()->code())); |
if (FLAG_trace_compiler || FLAG_trace_patching) { |
if (FLAG_trace_compiler) { |
ISL_Print(" "); |
@@ -790,7 +792,6 @@ static bool CompileParsedFunctionHelper(CompilationPipeline* pipeline, |
} |
function.set_unoptimized_code(code); |
function.AttachCode(code); |
- ASSERT(CodePatcher::CodeIsPatchable(code)); |
} |
if (parsed_function->HasDeferredPrefixes()) { |
ASSERT(!FLAG_load_deferred_eagerly); |