[vm/debugger] Fix race with CodeBreakpoint::ToCString(). Handle repeated notify compilation.
[vm/debugger] Fix race with CodeBreakpoint::ToCString(). Handle repeated notify compilation.

Retrieve CodeBreakpoint::ToCString() while we hold on to the CodeBreakpoint, before BreakpointLocation potentially deleted with terminated isolate.

GroupDebugger::NotifyCompilation(func) might be called several times for a given function when multiple isolates in a group race to compile it. Debugger needs to handle this scenario gracefully, ensure that already resolved breakpoints won't get resolved again.

TEST=observatory_2/tests/service_2/break_on_function_many_child_isolates_test

Fixes https://github.com/dart-lang/sdk/issues/45516.

Change-Id: Ieebab86103b1999a13daff7b7bbc87ffa778ec82
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/197520
Reviewed-by: Ben Konyi <67ffcaedcc3dc3d87dddb9627b72dd41756b31b1@google.com>
Commit-Queue: Alexander Aprelev <dfb74c35a357c2059971a4bf7fe26b6a7c18085d@google.com>

dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk