Enable vm:notify-debugger-on-exception for more use cases enabled by upstream fix (#81221)

This commit is contained in:
Michael Goderbauer 2021-04-26 13:10:04 -07:00 committed by GitHub
parent 52661bc713
commit a717e151b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 10 deletions

View file

@ -451,10 +451,7 @@ mixin SchedulerBinding on BindingBase {
/// ///
/// Also returns false if there are no tasks remaining. /// Also returns false if there are no tasks remaining.
@visibleForTesting @visibleForTesting
// TODO(goderbauer): Add pragma (and enable test in @pragma('vm:notify-debugger-on-exception')
// break_on_framework_exceptions_test.dart) once debugger breaks on correct
// line, https://github.com/dart-lang/sdk/issues/45684
// @pragma('vm:notify-debugger-on-exception')
bool handleEventLoopCallback() { bool handleEventLoopCallback() {
if (_taskQueue.isEmpty || locked) if (_taskQueue.isEmpty || locked)
return false; return false;

View file

@ -2834,10 +2834,7 @@ class BuildOwner {
/// ///
/// After the current call stack unwinds, a microtask that notifies listeners /// After the current call stack unwinds, a microtask that notifies listeners
/// about changes to global keys will run. /// about changes to global keys will run.
// TODO(goderbauer): Add pragma (and enable test in @pragma('vm:notify-debugger-on-exception')
// break_on_framework_exceptions_test.dart) once debugger breaks on correct
// line, https://github.com/dart-lang/sdk/issues/45684
// @pragma('vm:notify-debugger-on-exception')
void finalizeTree() { void finalizeTree() {
Timeline.startSync('Finalize tree', arguments: timelineArgumentsIndicatingLandmarkEvent); Timeline.startSync('Finalize tree', arguments: timelineArgumentsIndicatingLandmarkEvent);
try { try {

View file

@ -446,7 +446,7 @@ void main() {
final int breakLine = (await flutter.getSourceLocation()).line; final int breakLine = (await flutter.getSourceLocation()).line;
expect(breakLine, project.lineContaining(project.test, "throw 'scheduled task';")); expect(breakLine, project.lineContaining(project.test, "throw 'scheduled task';"));
}, skip: 'TODO(goderbauer): add pragma to SchedulerBinding.handleEventLoopCallback when https://github.com/dart-lang/sdk/issues/45684 is fixed and enable this test'); });
testWithoutContext('breaks when FrameCallback throws', () async { testWithoutContext('breaks when FrameCallback throws', () async {
final TestProject project = TestProject( final TestProject project = TestProject(
@ -665,7 +665,7 @@ void main() {
final int breakLine = (await flutter.getSourceLocation()).line; final int breakLine = (await flutter.getSourceLocation()).line;
expect(breakLine, project.lineContaining(project.test, "throw 'dispose';")); expect(breakLine, project.lineContaining(project.test, "throw 'dispose';"));
}, skip: 'TODO(goderbauer): add pragma to BuildOwner.finalizeTree when https://github.com/dart-lang/sdk/issues/45684 is fixed and enable this test'); });
testWithoutContext('breaks when rebuilding dirty elements throws', () async { testWithoutContext('breaks when rebuilding dirty elements throws', () async {
final TestProject project = TestProject( final TestProject project = TestProject(