- 
                Notifications
    
You must be signed in to change notification settings  - Fork 6k
 
iOS: Eliminate fml::scoped_nsobject pointer use #56295
Conversation
| 
           It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). 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. The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.  | 
    
| 
           This will be followed by a separate patch that deletes scoped_nsobject, its tests, and cleans up the build file.  | 
    
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
        
          
                shell/platform/darwin/ios/framework/Source/accessibility_bridge.mm
              
                Outdated
          
            Show resolved
            Hide resolved
        
      | 
           test-exempt: code refactor with no semantic change  | 
    
        
          
                shell/platform/darwin/ios/framework/Source/platform_views_controller.mm
              
                Outdated
          
            Show resolved
            Hide resolved
        
      Eliminates use of `fml::scoped_nsobject` now that the codebase has been migrated to ARC. Issue: flutter/flutter#137801
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.
Yay!
| NSMutableDictionary<NSNumber*, SemanticsObject*>* objects_; | ||
| FlutterBasicMessageChannel* accessibility_channel_; | 
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 guess even if they are fully Objective-C isa objects we don't use Objective-C naming (objects and accessibilityChannel)?
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.
In C++ contexts (C++ class fields) the style guide says we have to use C++ naming, which really hits the code with an ugly stick :(
Ref: https://google.github.io/styleguide/objcguide.html#style-matches-the-language
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.
If the naming of ivars and variables depended on the thing being pointed to rather than the context, things would be much, much uglier.
I guarantee nobody would be happier if individual lines of Obj-C++ code had mixes of different variable naming styles depending on the underlying types of the things the variables are referring to.
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.
Agreed, but it's still unfortunate. I'd much prefer we reduced the number of C++ classes with Obj-C++ implementations and used straight Obj-C[++] classes where possible. I realise that's not always possible -- e.g. cases where embedders have some translation unit containing subclasses of a common C++ superclass etc.
…158132) flutter/engine@25c7e47...f880b56 2024-11-04 30870216+gaaclarke@users.noreply.github.com Made it so angle builds on linux (flutter/engine#56328) 2024-11-04 jonahwilliams@google.com [Impeller] combine translate* scale mat mul when computing shader transform. (flutter/engine#56352) 2024-11-04 49699333+dependabot[bot]@users.noreply.github.com Bump actions/checkout from 4.2.1 to 4.2.2 (flutter/engine#56191) 2024-11-04 chris@bracken.jp iOS: Eliminate fml::scoped_nsobject pointer use (flutter/engine#56295) 2024-11-04 skia-flutter-autoroll@skia.org Roll Skia from e2ad60ea8039 to b2bb3af36da3 (1 revision) (flutter/engine#56355) 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 chinmaygarde@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
Eliminates use of `fml::scoped_nsobject` now that the codebase has been migrated to ARC. Issue: flutter#137801 No changes to tests since this patch makes no semantic changes. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Eliminates use of
fml::scoped_nsobjectnow that the codebase has been migrated to ARC.Issue: flutter/flutter#137801
No changes to tests since this patch makes no semantic changes.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.