Skip to content

Migrate the embedder tests from the legacy Dart native function format to FFI - #190615

Merged
auto-submit[bot] merged 1 commit into
flutter:masterfrom
jason-simmons:bug_190154_embedder
Aug 5, 2026
Merged

auto-submit[bot] merged 1 commit into
flutter:masterfrom
jason-simmons:bug_190154_embedder

Conversation

@jason-simmons

Copy link
Copy Markdown
Member

See #190154

@jason-simmons
jason-simmons requested review from a team as code owners August 5, 2026 14:52
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Aug 5, 2026
@github-actions github-actions Bot added engine flutter/engine related. See also e: labels. platform-macos Building on or for macOS specifically platform-windows Building on or for Windows specifically a: desktop Running on desktop team-macos Owned by the macOS platform team team-windows Owned by the Windows platform team labels Aug 5, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request migrates native callbacks in engine unit tests and platform test fixtures (macOS, Windows, and embedder) from the legacy CREATE_NATIVE_ENTRY and AddNativeCallback mechanism to Dart FFI using CREATE_FFI_LAMBDA and AddFfiNativeCallback. Dart test fixtures are updated to use @Native annotations. The review feedback recommends optimizing several captureless or effectively captureless lambdas by converting them directly to function pointers using the unary + operator, which avoids the memory leak and runtime overhead of CREATE_FFI_LAMBDA.

@jason-simmons
jason-simmons requested a review from b-luk August 5, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: desktop Running on desktop CICD Run CI/CD engine flutter/engine related. See also e: labels. platform-macos Building on or for macOS specifically platform-windows Building on or for Windows specifically team-macos Owned by the macOS platform team team-windows Owned by the Windows platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants