Additional asserts to debug issue #26927.

R=fschneider@google.com

Review URL: https://codereview.chromium.org/2413013002 .
This commit is contained in:
Ryan Macnak 2016-10-12 13:54:10 -07:00
parent ecb818a991
commit dc53ea46bc

View file

@ -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);
}