Skip to content

Conversation

@polina-c
Copy link
Contributor

@polina-c polina-c commented Sep 14, 2023

Contributes to #134575

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie or stuartmorgan on the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@github-actions github-actions bot added a: tests "flutter test", flutter_test, or one of our tests framework flutter/packages/flutter repository. See also f: labels. labels Sep 14, 2023
@polina-c polina-c requested a review from hannah-hyj September 14, 2023 20:07
@polina-c polina-c changed the title Add disposal mechanism to TestRecordingPaintingContext. Add disposal mechanism for created Layers to TestRecordingPaintingContext. Sep 14, 2023
@polina-c
Copy link
Contributor Author

polina-c commented Sep 14, 2023

@Hixie
Copy link
Contributor

Hixie commented Sep 14, 2023

test-exempt: preparing for extra testing

Copy link
Member

@hannah-hyj hannah-hyj left a comment

Choose a reason for hiding this comment

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

LGTM

@polina-c polina-c added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 16, 2023
@auto-submit auto-submit bot merged commit 60fae58 into flutter:master Sep 16, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 17, 2023
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Sep 17, 2023
flutter/flutter@e5e36ad...1b18b13

2023-09-17 [email protected] Roll Flutter Engine from e07bb975ee85 to 57a4ff3c7ff8 (1 revision) (flutter/flutter#134895)
2023-09-17 [email protected] Roll Flutter Engine from 444689fd4060 to e07bb975ee85 (1 revision) (flutter/flutter#134889)
2023-09-16 [email protected] Roll Flutter Engine from 8c2203bb6c3b to 444689fd4060 (1 revision) (flutter/flutter#134886)
2023-09-16 [email protected] Fix memory leak in CupertinoActionSheet (flutter/flutter#134885)
2023-09-16 [email protected] Add disposal mechanism for created Layers to TestRecordingPaintingContext. (flutter/flutter#134768)
2023-09-16 [email protected] Manual roll Flutter Engine from 490925676b91 to 8c2203bb6c3b (6 revisions) (flutter/flutter#134882)
2023-09-16 [email protected] Manual roll Flutter Engine from cdcbdcc7ccba to 490925676b91 (5 revisions) (flutter/flutter#134879)
2023-09-16 [email protected] Manual roll Flutter Engine from 30b7e9ded7a0 to cdcbdcc7ccba (5 revisions) (flutter/flutter#134877)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
canvas.restore();
return OpacityLayer();
final OpacityLayer layer = OpacityLayer();
_createdLayers.add(layer);
Copy link
Member

Choose a reason for hiding this comment

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

As I said on #134701 (comment), this is likely not the right fix. If I remember correctly, the contract of PaintingContext (which defines this method) is that the caller assumes ownership of the Layer and is in charge of disposing it. If this change is in fact "fixing" any leaks, it is only doing so for the test. In production (where a regular PaintContext and not the testing version is used) this leak is still present!

@polina-c polina-c added the a: leak tracking Issues and PRs related to memory leaks detected by leak_tracker label Sep 21, 2023
Mairramer pushed a commit to Mairramer/flutter that referenced this pull request Oct 10, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 15, 2023
@polina-c polina-c deleted the TestRecordingPaintingContext branch November 29, 2023 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: leak tracking Issues and PRs related to memory leaks detected by leak_tracker a: tests "flutter test", flutter_test, or one of our tests autosubmit Merge PR when tree becomes green via auto submit App framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants