Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@cbracken
Copy link
Member

@cbracken cbracken commented Oct 30, 2024

FlutterViewControllerTest testDrawLayer created a callback which strongly referenced itself in its own body as part of an asynchronous recursive loop. The recursion was unnecessary and the test consistently passes, even if run on repeat > 100 times without it.

Now that there's only one call, eliminates the unnecessary local and inlines it into the dispatch_after call.

This was originally introduced in #50072.

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 and the C++, Objective-C, Java style guides.
  • I didn't list at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

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

`FlutterViewControllerTest testDrawLayer` created a callback which
strongly referenced itself in its own body as part of an asynchronous
recursive loop. The recursion was unnecessary and the test consistenly
passes, even if run on repeat > 100 times without it.
@cbracken cbracken added the tech-debt Technical debt, code quality, testing, etc. label Oct 30, 2024
Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

LGTM

@cbracken cbracken added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 31, 2024
@auto-submit auto-submit bot merged commit c40b0b6 into flutter:main Oct 31, 2024
33 checks passed
@cbracken cbracken deleted the scenario-strong-retain-loop branch October 31, 2024 00:43
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 31, 2024
nick9822 pushed a commit to nick9822/flutter that referenced this pull request Dec 18, 2024
…6249)

`FlutterViewControllerTest testDrawLayer` created a callback which strongly referenced itself in its own body as part of an asynchronous recursive loop. The recursion was unnecessary and the test consistently passes, even if run on repeat > 100 times without it.

Now that there's only one call, eliminates the unnecessary local and inlines it into the `dispatch_after` call.

This was originally introduced in flutter/engine#50072.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App tech-debt Technical debt, code quality, testing, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants