[vm] Do not issue breakpoint resolved events without an isolate.

TEST=none
Bug: https://github.com/flutter/flutter/issues/113540
Change-Id: Ia176a304bd953678f99a06a84b7eec33be59a2a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264800
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
This commit is contained in:
Ryan Macnak 2022-10-19 16:12:28 +00:00 committed by Commit Queue
parent d9a5551af9
commit c55a2886c4

View file

@ -327,11 +327,17 @@ ActivationFrame::ActivationFrame(const Closure& async_activation,
}
bool Debugger::NeedsIsolateEvents() {
ASSERT(isolate_ == Isolate::Current());
return !Isolate::IsSystemIsolate(isolate_) &&
Service::isolate_stream.enabled();
}
bool Debugger::NeedsDebugEvents() {
if (Isolate::Current() == nullptr) {
// E.g., NoActiveIsolateScope.
return false;
}
ASSERT(isolate_ == Isolate::Current());
ASSERT(!Isolate::IsSystemIsolate(isolate_));
return FLAG_warn_on_pause_with_no_debugger || Service::debug_stream.enabled();
}