| Index: runtime/vm/code_generator.cc
|
| diff --git a/runtime/vm/code_generator.cc b/runtime/vm/code_generator.cc
|
| index 158eb0bebea37c62e140452901c25d1fdaf2b560..a039e0770e97fa71b573fe2db121dd332a9c5258 100644
|
| --- a/runtime/vm/code_generator.cc
|
| +++ b/runtime/vm/code_generator.cc
|
| @@ -1864,7 +1864,9 @@ DEFINE_RUNTIME_ENTRY(OptimizeInvokedFunction, 1) {
|
| ASSERT(isolate->background_compiler() != NULL);
|
| isolate->background_compiler()->CompileOptimized(function);
|
| // Continue in the same code.
|
| - arguments.SetReturn(Code::Handle(zone, function.CurrentCode()));
|
| + const Code& code = Code::Handle(zone, function.CurrentCode());
|
| + ASSERT(!code.IsDisabled());
|
| + arguments.SetReturn(code);
|
| return;
|
| }
|
| }
|
| @@ -1886,7 +1888,9 @@ DEFINE_RUNTIME_ENTRY(OptimizeInvokedFunction, 1) {
|
| const Code& optimized_code = Code::Handle(zone, function.CurrentCode());
|
| ASSERT(!optimized_code.IsNull());
|
| }
|
| - arguments.SetReturn(Code::Handle(zone, function.CurrentCode()));
|
| + const Code& code = Code::Handle(zone, function.CurrentCode());
|
| + ASSERT(!code.IsDisabled());
|
| + arguments.SetReturn(code);
|
| #else
|
| UNREACHABLE();
|
| #endif // !DART_PRECOMPILED_RUNTIME
|
| @@ -1935,6 +1939,7 @@ DEFINE_RUNTIME_ENTRY(FixCallersTarget, 0) {
|
| target_function.ToFullyQualifiedCString(),
|
| current_target_code.UncheckedEntryPoint());
|
| }
|
| + ASSERT(!current_target_code.IsDisabled());
|
| arguments.SetReturn(current_target_code);
|
| }
|
|
|
|
|