Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@dcharkes
Copy link
Contributor

@dcharkes dcharkes commented Jun 11, 2024

This initializes the NativeAssetsApi for native assets resolution in the isolate group creation callback.

Implementation considerations

The DartIO initialization lives in its own GN target. This doesn't work for the native assets initialization due to it having to look up the script_uri in one of the callbacks. Since the callbacks are function pointers, we can't have a lambda that captures the script uri. So instead, the native assets initialization lives in the flutter/runtime target.

The import from dart should probably be runtime/include/bin/native_assets_api.h to mirror what we're doing with dart IO, rather than directly importing from runtime/bin/native_assets.h.

Testing

All native asset testing is in flutter_tools, so those tests will only run once this rolls into flutter/flutter. I have done manual testing locally with a Dart branch that removes the fallback: https://dart-review.googlesource.com/c/sdk/+/370740

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

@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 "@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.

@chinmaygarde chinmaygarde added the Work in progress (WIP) Not ready (yet) for review! label Jun 13, 2024
@dcharkes dcharkes removed the Work in progress (WIP) Not ready (yet) for review! label Jun 17, 2024
@dcharkes dcharkes force-pushed the native-assets-api-init branch from 7ae8017 to c3b13de Compare June 17, 2024 18:55
@dcharkes dcharkes requested a review from mkustermann June 17, 2024 18:56
Copy link
Member

@mkustermann mkustermann left a comment

Choose a reason for hiding this comment

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

With 2 more comments addressed: LGTM

@dcharkes dcharkes added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 18, 2024
@auto-submit auto-submit bot merged commit 2d5c28e into main Jun 18, 2024
@auto-submit auto-submit bot deleted the native-assets-api-init branch June 18, 2024 06:21
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 18, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 18, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 18, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jun 18, 2024
…150421)

flutter/engine@78fdd06...74f42ca

2024-06-18 [email protected] [DisplayList] delete obsolete PathEffect sources (flutter/engine#53441)
2024-06-18 [email protected] Setup `NativeAssetsApi` during isolate group creation (flutter/engine#53329)
2024-06-18 49699333+dependabot[bot]@users.noreply.github.com Bump actions/checkout from 4.1.6 to 4.1.7 (flutter/engine#53445)
2024-06-18 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 3.25.8 to 3.25.10 (flutter/engine#53446)
2024-06-18 [email protected] Roll Skia from f18547e60ed8 to 6d541b4dddd0 (1 revision) (flutter/engine#53444)
2024-06-18 [email protected] Roll Skia from 2db8813a349d to f18547e60ed8 (1 revision) (flutter/engine#53442)

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],[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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants