-
Notifications
You must be signed in to change notification settings - Fork 6k
Migrate FlutterDartProject and FlutterPluginAppLifeCycleDelegate to ARC #52719
Conversation
|
|
||
| NSBundle* mainBundle = FLTGetApplicationBundle(); | ||
| NSBundle* engineBundle = [NSBundle bundleForClass:[FlutterViewController class]]; | ||
| NSBundle* engineBundle = [NSBundle bundleForClass:[FlutterView class]]; |
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.
FlutterViewController was an arbitrary choice, it just needs to be a class in Flutter.framework. Swap to FlutterView since that class was already migrated to ARC.
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.
can just use FlutterDartProject here?
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.
You're right, that's a better idea. 🙂
| #include "flutter/fml/logging.h" | ||
| #include "flutter/fml/paths.h" | ||
| #include "flutter/lib/ui/plugins/callback_cache.h" | ||
| #import "flutter/shell/platform/darwin/ios/framework/Headers/FlutterViewController.h" |
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.
Unused.
|
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 "@test-exemption-reviewer" in 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. |
|
|
||
| NSBundle* mainBundle = FLTGetApplicationBundle(); | ||
| NSBundle* engineBundle = [NSBundle bundleForClass:[FlutterViewController class]]; | ||
| NSBundle* engineBundle = [NSBundle bundleForClass:[FlutterView class]]; |
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.
can just use FlutterDartProject here?
| } | ||
|
|
||
| - (void)dealloc { | ||
| for (dispatch_block_t unsubscribe in _notificationUnsubscribers) { |
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.
You can delete this code, all of dealloc, _notificationUnsubscribers itself, and optionally the addObserver:forSelector: helper that will just become a single line. This unregistration hasn't been necessary since we dropped iOS 8 support.
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.
I was going to do all the unsubscribes separately, I didn't have a chance to put it out for review yet, it's waiting for this PR to merge.
jmagman@02a177c
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.
|
test-exempt: code refactor with no semantic change |
…148260) flutter/engine@1150240...aeff9b1 2024-05-13 [email protected] Migrate FlutterDartProject and FlutterPluginAppLifeCycleDelegate to ARC (flutter/engine#52719) 2024-05-13 [email protected] Roll Skia from dde1f5dba183 to 75b3286ecaac (1 revision) (flutter/engine#52763) 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
FlutterDartProjectandFlutterPluginAppLifeCycleDelegatefrom MRC to ARC.objectForKey:to subscripting.Part of flutter/flutter#137801.