-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Has a binary messenger #9419
Has a binary messenger #9419
Conversation
BinaryMessengers. This allows us to break retain cycles and makes the leaking channels we have not less dire.
This example code will have to change as a result of this PR. |
Relevant issue: flutter/flutter#26007 |
Email has been sent to flutter-announce: https://groups.google.com/forum/#!topic/flutter-announce/ewwf2Rhm9Uo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is way better than how it was already. Though since we're going to break API anyway, I'd love it if we made the 2 platforms' APIs more consistent flutter/flutter#33099.
Doesn't have to be all in one PR but we can pre-plan it and keep the component move gradual if we're going to have a DartExecutor which implements a BinaryMessenger.
shell/platform/darwin/ios/framework/Headers/FlutterViewController.h
Outdated
Show resolved
Hide resolved
@xster Sounds good wrt Android. I haven't looked at the Android side much. We probably need a bigger exploration to see how we can unify. I poked around a bit and they are pretty diverged right now so I don't know if its necessary to have to make an android change in response to this change yet. |
yes, there's unfortunately a bit of divergence currently. Since it's a breaking change, we should ideally plan ahead a bit and not break a second time this quarter. I pinged you a list of other API differences. Let's chat tomorrow to work out something progressive but that we won't break in the future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
My general wish is to remove all knowledge of binaryMessengers from the vcs. How we do it in incremental PRs, you can decide as long as we get it all in before the next stable cut.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
flutter/engine@185087a...4aaa1a9 git log 185087a..4aaa1a9 --no-merges --oneline 4aaa1a9 Roll src/third_party/skia 842e92e29216..b851469b8e96 (6 commits) (flutter/engine#9568) 4e48fc4 Switched preprocessor logic for exporting symbols for testing. (NDEBUG (flutter/engine#9562) 50a8e73 Has a binary messenger (flutter/engine#9419) 7483665 Re-enable embedder_unittests. (flutter/engine#9482) 773cf53 Roll fuchsia/sdk/core/linux-amd64 from SuKWYMSXAMq1uTo9eaIdIOQqBb7Ro-zLyNk01GPOiU8C to N9HpdqEHzWZIcSV_3JN4PNlUNeoK-Pism-mc-a7L-IoC (flutter/engine#9560) c2fa689 Roll src/third_party/skia d8f79a27b06b..842e92e29216 (108 commits) (flutter/engine#9558) 00c023b Roll fuchsia/sdk/core/mac-amd64 from dcGnduqJ5C8ozmUHeeboHC76nOv7s4XfCKIfefQlGkQC to 6WJ2NCb9uaOzVw20XC4kJqNcD4EP2VxT-PBocGsA6JsC (flutter/engine#9557) 7b9f59e Run benchmarks on try jobs. (flutter/engine#9493) The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff ([email protected]), and stop the roller if necessary.
flutter/engine@185087a...4aaa1a9 git log 185087a..4aaa1a9 --no-merges --oneline 4aaa1a9 Roll src/third_party/skia 842e92e29216..b851469b8e96 (6 commits) (flutter/engine#9568) 4e48fc4 Switched preprocessor logic for exporting symbols for testing. (NDEBUG (flutter/engine#9562) 50a8e73 Has a binary messenger (flutter/engine#9419) 7483665 Re-enable embedder_unittests. (flutter/engine#9482) 773cf53 Roll fuchsia/sdk/core/linux-amd64 from SuKWYMSXAMq1uTo9eaIdIOQqBb7Ro-zLyNk01GPOiU8C to N9HpdqEHzWZIcSV_3JN4PNlUNeoK-Pism-mc-a7L-IoC (flutter/engine#9560) c2fa689 Roll src/third_party/skia d8f79a27b06b..842e92e29216 (108 commits) (flutter/engine#9558) 00c023b Roll fuchsia/sdk/core/mac-amd64 from dcGnduqJ5C8ozmUHeeboHC76nOv7s4XfCKIfefQlGkQC to 6WJ2NCb9uaOzVw20XC4kJqNcD4EP2VxT-PBocGsA6JsC (flutter/engine#9557) 7b9f59e Run benchmarks on try jobs. (flutter/engine#9493) The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff ([email protected]), and stop the roller if necessary.
I made FlutterViewController and FlutterEngine both have binary messengers instead of publicly being binary messengers. This breaks certain retain cycles that we could create. It also minimizes the damage of the current problem we have where channels always leak on iOS. It has a fail-safe mechanism where talking to dead channels just gets ignored.
This won't break plugins, but it will potentially break some add2app scenarios. The client may have been saying:
They will now have to say: