Skip to content
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

Wrap the iOS platform message handler in an autorelease pool block #40373

Merged
merged 1 commit into from Mar 17, 2023

Conversation

jason-simmons
Copy link
Member

With background platform isolate channels, the handler can be invoked on threads that are created by Dart and do not already have an autorelease pool.

Fixes flutter/flutter#122792

With background platform isolate channels, the handler can be invoked
on threads that are created by Dart and do not already have an
autorelease pool.

Fixes flutter/flutter#122792
@flutter-dashboard
Copy link

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 Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on 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.

Copy link
Member

@gaaclarke gaaclarke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there should be runtime warnings getting printed out if you are adding objects to the autorelease pool but there isn't one present.

If you want to add a test for this it wouldn't be that hard. In platform_message_handler_ios_test.mm you could make an NSObject that takes in a pointer to a bool and sets it's value in its dealloc. Then you can assert that dealloc was called.

@jason-simmons jason-simmons added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 17, 2023
@auto-submit auto-submit bot merged commit 2cd19e3 into flutter:main Mar 17, 2023
32 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 17, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 17, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 17, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 17, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 17, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 17, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 18, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 18, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 18, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 18, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 18, 2023
zanderso pushed a commit to flutter/flutter that referenced this pull request Mar 18, 2023
…122942)

* e6334f166 [web] Remove image codecs from Canvaskit Chromium (flutter/engine#40309)

* 56727d62c Revert "[Impeller] mark decoded images as optimized for GPU access (#40356)" (flutter/engine#40387)

* 2cd19e3d1 Wrap the iOS platform message handler in an autorelease pool block (flutter/engine#40373)

* bab7853ad Update analyzer for api_conform_test (flutter/engine#40386)

* 87b2e82d1 Roll Fuchsia Mac SDK from z32cF6YFs6CvZbY3g... to 4ZrEK2uzGdp_Gz3DU... (flutter/engine#40385)

* fc57995fe Ignore some MTLCompiler failures in impeller unit tests (flutter/engine#40391)

* 2398c5222 Add doc comment to Pipeline (flutter/engine#40388)

* f585d4bc5 [macOS] Remove a single accessibility root assumption (flutter/engine#40316)

* 940cf3c98 remove temporary flag and make FlutterTest the default font for real (flutter/engine#40352)

* a1bf9fd2a drawTextBlob should not be compatible with opacity inheritance (flutter/engine#40396)

* 55bf0d85e Use bundled analyzer everywhere (flutter/engine#40398)

* 8e580414a Roll Skia from 9bfb45d3e065 to 49b902e5fb91 (11 revisions) (flutter/engine#40397)

* 77c53d25e Default the CanvasKit base URL to local artifacts. (flutter/engine#40293)

* 625ea5395 Roll Skia from 49b902e5fb91 to aa983f5486f0 (7 revisions) (flutter/engine#40404)

* 867679fac [Impeller] Add playground flag to render for a specific amount of time. (flutter/engine#40377)

* d74169608 [Impeller] Remove unused bounds method from typographer interface (flutter/engine#40406)

* 941323d77 Provisional iOS impeller flag flip (flutter/engine#40405)

* bb971ab55 Revert "Default the CanvasKit base URL to local artifacts. (#40293)" (flutter/engine#40415)
zanderso pushed a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App needs tests platform-ios
Projects
None yet
2 participants