This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
[Darwin] Move FlutterBinaryMessengerRelay to common #44395
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7820b7e
to
cb2b300
Compare
That patch is landed and this is now rebased to tip of tree. |
gaaclarke
reviewed
Aug 4, 2023
shell/platform/darwin/common/framework/Source/FlutterBinaryMessengerRelayTest.mm
Outdated
Show resolved
Hide resolved
0906a1d
to
c3482ce
Compare
gaaclarke
approved these changes
Aug 4, 2023
shell/platform/darwin/common/framework/Source/FlutterBinaryMessengerRelayTest.mm
Outdated
Show resolved
Hide resolved
172f755
to
8b06b1b
Compare
auto label is removed for flutter/engine/44395, due to - The status or check suite Linux mac_unopt has failed. Please fix the issues identified (or deflake) before re-applying this label. |
Migrates FlutterBinaryMessengerRelay to //flutter/shell/platform/darwin/common so that it can be used in a followup patch on macOS, to fix a memory leak due to a retain cycle. Migrates the unit tests to be compatible with gtest, which is used by the darwin/common unit tests. Issue: flutter/flutter#116445
8b06b1b
to
4eb5c59
Compare
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Aug 4, 2023
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Aug 5, 2023
fluttermirroringbot
pushed a commit
to flutter/flutter
that referenced
this pull request
Aug 5, 2023
…131972) flutter/engine@a0d650e...138a1ea 2023-08-04 [email protected] Roll Skia from 7cf7e2da3557 to b2a0382bb587 (1 revision) (flutter/engine#44407) 2023-08-04 [email protected] [Darwin] Move FlutterBinaryMessengerRelay to common (flutter/engine#44395) 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],[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://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
8 tasks
cbracken
added a commit
to cbracken/flutter_engine
that referenced
this pull request
Aug 7, 2023
Previously, FlutterEngine.binaryMessenger returned the FlutterEngine instance itself, which meant that channels/plugins could hold a strong reference to the engine and thus cause a retain cycle, preventing the engine from being deallocated. We introduce FlutterBinaryMessengerRelay, which implements the FlutterBinaryMessenger protocol, by delegating back to the engine, to which it holds a weak reference, thus avoiding the retain cycle. This also changes the FlutterBinaryMessengerRelay.parent property from an assign property to a weak property since that code is compiled with ARC enabled as of flutter#44395. This patch also rearranges the headers to comply with our style guide: related headers for this file, C headers, C++ headers, other Flutter headers, in that order. Issue: flutter/flutter#116445
cbracken
added a commit
to cbracken/flutter_engine
that referenced
this pull request
Aug 7, 2023
Previously, FlutterEngine.binaryMessenger returned the FlutterEngine instance itself, which meant that channels/plugins could hold a strong reference to the engine and thus cause a retain cycle, preventing the engine from being deallocated. We introduce FlutterBinaryMessengerRelay, which implements the FlutterBinaryMessenger protocol, by delegating back to the engine, to which it holds a weak reference, thus avoiding the retain cycle. This also changes the FlutterBinaryMessengerRelay.parent property from an assign property to a weak property since that code is compiled with ARC enabled as of flutter#44395. This patch also rearranges the headers to comply with our style guide: related headers for this file, C headers, C++ headers, other Flutter headers, in that order. Issue: flutter/flutter#116445
cbracken
added a commit
to cbracken/flutter_engine
that referenced
this pull request
Aug 7, 2023
Previously, FlutterEngine.binaryMessenger returned the FlutterEngine instance itself, which meant that channels/plugins could hold a strong reference to the engine and thus cause a retain cycle, preventing the engine from being deallocated. We introduce FlutterBinaryMessengerRelay, which implements the FlutterBinaryMessenger protocol, by delegating back to the engine, to which it holds a weak reference, thus avoiding the retain cycle. This also changes the FlutterBinaryMessengerRelay.parent property from an assign property to a weak property since that code is compiled with ARC enabled as of flutter#44395. This patch also rearranges the headers to comply with our style guide: related headers for this file, C headers, C++ headers, other Flutter headers, in that order. Issue: flutter/flutter#116445
cbracken
added a commit
that referenced
this pull request
Aug 8, 2023
Previously, FlutterEngine.binaryMessenger returned the FlutterEngine instance itself, which meant that channels/plugins could hold a strong reference to the engine and thus cause a retain cycle, preventing the engine from being deallocated. We introduce FlutterBinaryMessengerRelay, which implements the FlutterBinaryMessenger protocol, by delegating back to the engine, to which it holds a weak reference, thus avoiding the retain cycle. This also changes the FlutterBinaryMessengerRelay.parent property from an assign property to a weak property since that code is compiled with ARC enabled as of #44395. This patch also rearranges the headers to comply with our style guide: related headers for this file, C headers, C++ headers, other Flutter headers, in that order. Fixes: flutter/flutter#116445
gaaclarke
pushed a commit
to gaaclarke/engine
that referenced
this pull request
Aug 30, 2023
Migrates FlutterBinaryMessengerRelay to //flutter/shell/platform/darwin/common so that it can be used in a followup patch on macOS, to fix a memory leak due to a retain cycle. Migrates the unit tests to be compatible with gtest, which is used by the darwin/common unit tests. Issue: flutter/flutter#116445 ## Pre-launch Checklist - [X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [X] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [X] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [X] I listed at least one issue that this PR fixes in the description above. - [X] I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See [testing the engine] for instructions on writing and running engine tests. - [X] I updated/added relevant documentation (doc comments with `///`). - [X] I signed the [CLA]. - [X] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat
gaaclarke
pushed a commit
to gaaclarke/engine
that referenced
this pull request
Aug 30, 2023
Previously, FlutterEngine.binaryMessenger returned the FlutterEngine instance itself, which meant that channels/plugins could hold a strong reference to the engine and thus cause a retain cycle, preventing the engine from being deallocated. We introduce FlutterBinaryMessengerRelay, which implements the FlutterBinaryMessenger protocol, by delegating back to the engine, to which it holds a weak reference, thus avoiding the retain cycle. This also changes the FlutterBinaryMessengerRelay.parent property from an assign property to a weak property since that code is compiled with ARC enabled as of flutter#44395. This patch also rearranges the headers to comply with our style guide: related headers for this file, C headers, C++ headers, other Flutter headers, in that order. Fixes: flutter/flutter#116445
8 tasks
8 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Migrates FlutterBinaryMessengerRelay to
//flutter/shell/platform/darwin/common so that it can be used in a followup patch on macOS, to fix a memory leak due to a retain cycle.
Migrates the unit tests to be compatible with gtest, which is used by the darwin/common unit tests.
Issue: flutter/flutter#116445
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.