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

Conversation

@gaaclarke
Copy link
Member

@gaaclarke gaaclarke commented Aug 30, 2022

This provides all the work for handling platform channels in the Dart->Host direction for Android. For more details and integration tests see the framework PR.

Integration tests exist in the framework PR.

companion framework PR: flutter/flutter#111279
companion engine PR (iOS): #35174
issue: flutter/flutter#13937

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 Hixie said 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.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@gaaclarke gaaclarke force-pushed the isolate-platform-channels-android branch from 7762c1f to 399240f Compare September 12, 2022 20:34
@gaaclarke gaaclarke marked this pull request as ready for review September 12, 2022 20:35
@gaaclarke gaaclarke requested a review from dnfield September 12, 2022 20:35
@gaaclarke
Copy link
Member Author

@dnfield there isn't much code that is changed here, mostly comments and turning one integer atomic. If you want me to walk through why this is safe let me know. I've added comments to where the threading policy is changing so you can read through to make sure it's safe. My testing plan is to rely on the integration tests in the framework PR.

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

@gaaclarke
Copy link
Member Author

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!).

Integration tests are in the framework PR.

HandlerInfo handlerInfo;
boolean messageDeferred;
// TODO(gaaclarke): This can potentially be a bottleneck and could replaced
// with a read/write lock.
Copy link
Contributor

Choose a reason for hiding this comment

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

file a bug

Copy link
Member Author

Choose a reason for hiding this comment

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

I switched it to a regular comment if you don't mind. I'm not sure I want to commit to the idea that it is something we need to do, but I don't want to lose the idea that it was something we could do.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it'd be fine to file a bug either way to add a benchmark for this and figure out if/how much a different lock would help. But non-blocking for landing this.

Copy link
Member Author

Choose a reason for hiding this comment

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

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 needs tests platform-android platform-ios platform-web Code specifically for the web engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants