| Index: runtime/vm/debugger.cc
|
| diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc
|
| index ac05de0b61080fde02d7aebad73df7c4c1eaafbb..396a86974a67a5e334543a3a445ae54da0175e85 100644
|
| --- a/runtime/vm/debugger.cc
|
| +++ b/runtime/vm/debugger.cc
|
| @@ -16,6 +16,7 @@
|
| #include "vm/flags.h"
|
| #include "vm/globals.h"
|
| #include "vm/json_stream.h"
|
| +#include "vm/kernel_reader.h"
|
| #include "vm/longjump.h"
|
| #include "vm/message_handler.h"
|
| #include "vm/object.h"
|
| @@ -57,6 +58,7 @@ DEFINE_FLAG(bool,
|
| "the VM service.");
|
|
|
| DECLARE_FLAG(bool, warn_on_pause_with_no_debugger);
|
| +DECLARE_FLAG(bool, use_dart_frontend);
|
|
|
| #ifndef PRODUCT
|
|
|
| @@ -2662,7 +2664,25 @@ bool Debugger::FindBestFit(const Script& script,
|
| // the breakpoint in.
|
| continue;
|
| }
|
| - if (Parser::FieldHasFunctionLiteralInitializer(field, &start, &end)) {
|
| + if (!field.has_initializer()) {
|
| + continue;
|
| + }
|
| +
|
| + bool has_func_literal_initializer = false;
|
| +#ifndef DART_PRECOMPILED_RUNTIME
|
| + if (FLAG_use_dart_frontend) {
|
| + has_func_literal_initializer =
|
| + kernel::KernelReader::FieldHasFunctionLiteralInitializer(
|
| + field, &start, &end);
|
| + } else {
|
| +#endif // !DART_PRECOMPILED_RUNTIME
|
| + has_func_literal_initializer =
|
| + Parser::FieldHasFunctionLiteralInitializer(field, &start, &end);
|
| +#ifndef DART_PRECOMPILED_RUNTIME
|
| + }
|
| +#endif // !DART_PRECOMPILED_RUNTIME
|
| +
|
| + if (has_func_literal_initializer) {
|
| if ((start <= token_pos && token_pos <= end) ||
|
| (token_pos <= start && start <= last_token_pos)) {
|
| return true;
|
|
|