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 Nov 8, 2024

fml::CFRef implements the bulk of the operations implemented in the one-off Scoped class except with better safety guarantees such as [[nodiscard]] on the Release method. It doesn't implement the handle() method that allows direct writing into the internal storage of the wrapper, but that method is effectively an escape hatch for all the safety guarantees provided by the wrapper, so it seems safer to avoid adding it.

No changes to tests since this includes no semantic changes.

Issue: flutter/flutter#137801

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 listed 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.

@flutter-dashboard

This comment was marked as resolved.

@cbracken
Copy link
Member Author

cbracken commented Nov 8, 2024

Added a test.

`fml::CFRef` implements the bulk of the operations implemented in the
one-off `Scoped` class. It doesn't implement the `handle()` method that
allows direct writing into the internal storage of the wrapper, but that
method is effectively an escape hatch for all the safety guarantees
provided by the wrapper, so it seems safer to avoid adding it.

Issue: flutter/flutter#137801
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.

RSLGTM

Copy link
Contributor

@stuartmorgan-g stuartmorgan-g left a comment

Choose a reason for hiding this comment

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

LGTM


// Template specialization used in CFTest.SupportsCustomRetainRelease.
template <>
struct CFRefTraits<int64_t> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not proud of what I've done... but I kind of am...

@cbracken cbracken added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 9, 2024
@auto-submit auto-submit bot merged commit ca6f511 into flutter:main Nov 9, 2024
30 checks passed
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Nov 9, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 9, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Nov 9, 2024
…158411)

flutter/engine@2f097cf...ca6f511

2024-11-09 [email protected] iOS: Use fml::CFRef in place of Scoped (flutter/engine#56463)
2024-11-09 [email protected] Roll Dart SDK from 307869c696e8 to ed9a5b1110ae (2 revisions) (flutter/engine#56465)
2024-11-08 [email protected] fml: delete unused scoped_policy (flutter/engine#56462)

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

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

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
@cbracken cbracken deleted the cfref-profiler-metrics branch November 9, 2024 19:27
auto-submit bot pushed a commit that referenced this pull request Nov 10, 2024
Eliminates the use of statics in CFTest.SupportsCustomRetainRelease (introduced in #56463), "clever" as it was.

Issue: flutter/flutter#137801

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
nick9822 pushed a commit to nick9822/flutter that referenced this pull request Dec 18, 2024
`fml::CFRef` implements the bulk of the operations implemented in the one-off `Scoped` class except with better safety guarantees such as `[[nodiscard]]` on the `Release` method. It doesn't implement the `handle()` method that allows direct writing into the internal storage of the wrapper, but that method is effectively an escape hatch for all the safety guarantees provided by the wrapper, so it seems safer to avoid adding it.

No changes to tests since this includes no semantic changes.

Issue: flutter#137801

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
nick9822 pushed a commit to nick9822/flutter that referenced this pull request Dec 18, 2024
…56480)

Eliminates the use of statics in CFTest.SupportsCustomRetainRelease (introduced in flutter/engine#56463), "clever" as it was.

Issue: flutter#137801

[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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants