这是indexloc提供的服务,不要输入任何密码
Skip to content

Fix error resolution when a completer is already set #81014

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 23, 2021

Conversation

dnfield
Copy link
Contributor

@dnfield dnfield commented Apr 23, 2021

Fixes #80969

The test this modifies was never actually getting into the FlutterError.onError because of an assertion around setCompleter. An upcoming dart roll made the whole test blow up. This version now asserts that we get into FlutterError.onError as expected, and passes with the Dart revision to the way Zone error handling happens.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard flutter-dashboard bot added the framework flutter/packages/flutter repository. See also f: labels. label Apr 23, 2021
@google-cla google-cla bot added the cla: yes label Apr 23, 2021
Comment on lines 337 to 339
if (stream.completer == null) {
stream.setCompleter(imageCompleter);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this, we trip over an assertion error. The test used to be happy because Dart didn't bubble it up to the outter zone handler in the test, but we actually just stopped execution here and didn't do what we think we were doing.

See dart-lang/sdk@88a351f

@fluttergithubbot fluttergithubbot merged commit 08ca8b0 into flutter:master Apr 23, 2021
@dnfield dnfield deleted the image_completer branch April 23, 2021 04:15
dart-bot pushed a commit to dart-lang/sdk that referenced this pull request Apr 23, 2021
… to their parent zone."

This reverts commit f0a8b63.

Reason for revert: The Flutter SDK issues have been resolved - see flutter/flutter#80969 and flutter/flutter#81014

Original change's description:
> Revert "Make throwing Zone.uncaughtError handlers propagate the error to their parent zone."
>
> This reverts commit 88a351f.
>
> This broke the Dart SDK -> Flutter Engine roller. Flutter issue at flutter/flutter#80969
>
> Change-Id: Idaf255a730c7b6054e6cd929b6770dbe66860151
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196561
> Reviewed-by: Zach Anderson <zra@google.com>
> Commit-Queue: Zach Anderson <zra@google.com>

# Not skipping CQ checks because this is a reland.

Change-Id: Icd98c550c63160f35cc5da40af7ca6bf2cbf180e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196621
Reviewed-by: Dan Field <dnfield@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Dan Field <dnfield@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test/painting/image_provider_test.dart failing on Linux Web Framework tests
3 participants