Migrate FlutterChannelKeyResponder and FlutterSpellCheckPlugin to ARC#52148
Migrate FlutterChannelKeyResponder and FlutterSpellCheckPlugin to ARC#52148auto-submit[bot] merged 2 commits intoflutter:mainfrom
Conversation
| - (void)dealloc { | ||
| [_suggestions release]; | ||
| [super dealloc]; | ||
| return @{ |
There was a problem hiding this comment.
Avoid the NSMutableDictionary
e116695 to
5066c4c
Compare
stuartmorgan-g
left a comment
There was a problem hiding this comment.
LGTM. Two quick suggested improvements to lines you are touching anyway, but both are preexisting and minor so your call.
| NSString* charactersIgnoringModifiers = | ||
| getEventCharacters(press.key.charactersIgnoringModifiers, press.key.keyCode); | ||
| NSMutableDictionary* keyMessage = [[@{ | ||
| NSMutableDictionary* keyMessage = [@{ |
There was a problem hiding this comment.
You can just make this an NSDictionary and remove the mutableCopy; sendMessage: doesn't require a mutable dictionary. I looked at the history; there used to be conditional additional key/value setting logic, which is why it was mutable, but now that's just cruft.
| } while (nextSpellSuggestion != nil && nextOffset < text.length); | ||
|
|
||
| NSMutableArray* methodChannelResult = [[[NSMutableArray alloc] init] autorelease]; | ||
| NSMutableArray* methodChannelResult = [[NSMutableArray alloc] init]; |
There was a problem hiding this comment.
Optional nit: it would be nice to make this an initWithCapacity: to avoid pointless re-allocations in the loop, since we know the length will be the same as allSpellSuggestions.
3d7715d to
9502111
Compare
flutter/engine@4d69c0c...e7d8c62 2024-04-16 magder@google.com Migrate FlutterChannelKeyResponder and FlutterSpellCheckPlugin to ARC (flutter/engine#52148) 2024-04-16 skia-flutter-autoroll@skia.org Roll Skia from b83b6bf7174f to e335a0a11aa0 (1 revision) (flutter/engine#52175) 2024-04-16 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[Impeller] remove most temporary allocation during polyline generation. (#52131)" (flutter/engine#52177) 2024-04-16 skia-flutter-autoroll@skia.org Roll Skia from d506a3d526f7 to b83b6bf7174f (2 revisions) (flutter/engine#52173) 2024-04-16 magder@google.com Migrate FlutterUIPressProxy, ios_context*, rendering_api_selection, and a few other files to ARC (flutter/engine#51633) 2024-04-16 skia-flutter-autoroll@skia.org Roll Skia from 98dbba281a84 to d506a3d526f7 (2 revisions) (flutter/engine#52170) 2024-04-16 skia-flutter-autoroll@skia.org Roll Dart SDK from f2464b2892a1 to 57d7cba5bc3d (1 revision) (flutter/engine#52168) 2024-04-16 skia-flutter-autoroll@skia.org Roll Skia from 300741074b41 to 98dbba281a84 (11 revisions) (flutter/engine#52167) 2024-04-16 30870216+gaaclarke@users.noreply.github.com [Impeller] removes advanced plus blending (flutter/engine#52163) 2024-04-16 jonahwilliams@google.com [Impeller] remove most temporary allocation during polyline generation. (flutter/engine#52131) 2024-04-16 jason-simmons@users.noreply.github.com Roll reclient, libpng, and zlib (flutter/engine#52072) 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 jsimmons@google.com,rmistry@google.com,zra@google.com 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
…46857) flutter/engine@4d69c0c...e7d8c62 2024-04-16 magder@google.com Migrate FlutterChannelKeyResponder and FlutterSpellCheckPlugin to ARC (flutter/engine#52148) 2024-04-16 skia-flutter-autoroll@skia.org Roll Skia from b83b6bf7174f to e335a0a11aa0 (1 revision) (flutter/engine#52175) 2024-04-16 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[Impeller] remove most temporary allocation during polyline generation. (flutter#52131)" (flutter/engine#52177) 2024-04-16 skia-flutter-autoroll@skia.org Roll Skia from d506a3d526f7 to b83b6bf7174f (2 revisions) (flutter/engine#52173) 2024-04-16 magder@google.com Migrate FlutterUIPressProxy, ios_context*, rendering_api_selection, and a few other files to ARC (flutter/engine#51633) 2024-04-16 skia-flutter-autoroll@skia.org Roll Skia from 98dbba281a84 to d506a3d526f7 (2 revisions) (flutter/engine#52170) 2024-04-16 skia-flutter-autoroll@skia.org Roll Dart SDK from f2464b2892a1 to 57d7cba5bc3d (1 revision) (flutter/engine#52168) 2024-04-16 skia-flutter-autoroll@skia.org Roll Skia from 300741074b41 to 98dbba281a84 (11 revisions) (flutter/engine#52167) 2024-04-16 30870216+gaaclarke@users.noreply.github.com [Impeller] removes advanced plus blending (flutter/engine#52163) 2024-04-16 jonahwilliams@google.com [Impeller] remove most temporary allocation during polyline generation. (flutter/engine#52131) 2024-04-16 jason-simmons@users.noreply.github.com Roll reclient, libpng, and zlib (flutter/engine#52072) 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 jsimmons@google.com,rmistry@google.com,zra@google.com 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
Clean up headers in FlutterChannelKeyResponder and FlutterSpellCheckPlugin. Migrate to ARC.
Move
FlutterSpellCheckResultinterface into the .mm since it's only used there.Part of flutter/flutter#137801.
Blocked by #51633
FlutterUIPressProxy