| Index: runtime/vm/code_generator.cc
|
| ===================================================================
|
| --- runtime/vm/code_generator.cc (revision 5412)
|
| +++ runtime/vm/code_generator.cc (working copy)
|
| @@ -1204,6 +1204,12 @@
|
| ASSERT(arguments.Count() ==
|
| kOptimizeInvokedFunctionRuntimeEntry.argument_count());
|
| const Function& function = Function::CheckedHandle(arguments.At(0));
|
| + if (isolate->debugger()->IsActive()) {
|
| + // We cannot set breakpoints in optimized code, so do not optimize
|
| + // the function.
|
| + function.set_usage_counter(0);
|
| + return;
|
| + }
|
| if (function.deoptimization_counter() >=
|
| FLAG_deoptimization_counter_threshold) {
|
| // TODO(srdjan): Investigate excessive deoptimization.
|
|
|