-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[pigeon] Fixes potential race condition caused by a ProxyApi constructor message call being made in an async method #8656
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
Conversation
stuartmorgan-g
left a comment
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 with nit.
Were you eventually able to repro it, or is it still speculative as to whether this is enough to fix the webview issue?
| indent.format(''' | ||
| final List<Object?>? ${varNamePrefix}replyList = | ||
| \t\tawait ${varNamePrefix}channel.send($sendArgument) as List<Object?>?; | ||
| \t\tawait ${varNamePrefix}sendFuture as List<Object?>?; |
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.
This variable name (${varNamePrefix}sendFuture) should be a local variable used in the two places, since it needs to match.
tarrinneal
left a comment
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.
looks good
|
@stuartmorgan I could only reproduce it when I added a I wasn't able to reproduce it without |
…constructor message call being made in an async method (flutter/packages#8656)
…constructor message call being made in an async method (flutter/packages#8656)
flutter/packages@cb4fb13...a9b9172 2025-02-19 [email protected] [google_maps_flutter] Platform interface for camera animation duration (flutter/packages#8596) 2025-02-18 [email protected] [various] Update Pigeon for task queue changes (flutter/packages#8654) 2025-02-18 [email protected] [pigeon] Fixes potential race condition caused by a ProxyApi constructor message call being made in an async method (flutter/packages#8656) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [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
…he internal wrapper immediately sends constructor calls (#8657) Potential solution to flutter/flutter#162437 As stated in #8656 (comment), I can only reproduce the crash when adding a delay in the async anonymous function. This should ideally prevent that crash by ensuring the send call is made before entering an async method.
…tor message call being made in an async method (flutter#8656) Host api calls now declare a `Future` variable from `channel.send` first. Then it `await`s the future immedieately or inside of a async method. Part of fixing webview_flutter_wkwebview issue: flutter/flutter#162437
…he internal wrapper immediately sends constructor calls (flutter#8657) Potential solution to flutter/flutter#162437 As stated in flutter#8656 (comment), I can only reproduce the crash when adding a delay in the async anonymous function. This should ideally prevent that crash by ensuring the send call is made before entering an async method.
…tor message call being made in an async method (flutter#8656) Host api calls now declare a `Future` variable from `channel.send` first. Then it `await`s the future immedieately or inside of a async method. Part of fixing webview_flutter_wkwebview issue: flutter/flutter#162437
…he internal wrapper immediately sends constructor calls (flutter#8657) Potential solution to flutter/flutter#162437 As stated in flutter#8656 (comment), I can only reproduce the crash when adding a delay in the async anonymous function. This should ideally prevent that crash by ensuring the send call is made before entering an async method.
…he internal wrapper immediately sends constructor calls (#8657) Potential solution to flutter/flutter#162437 As stated in flutter/packages#8656 (comment), I can only reproduce the crash when adding a delay in the async anonymous function. This should ideally prevent that crash by ensuring the send call is made before entering an async method.
Host api calls now declare a
Futurevariable fromchannel.sendfirst. Then itawaits the future immedieately or inside of a async method.Part of fixing webview_flutter_wkwebview issue: flutter/flutter#162437
Pre-launch Checklist
dart format.)[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style, or this PR is exempt from CHANGELOG changes.///).If you need help, consider asking for advice on the #hackers-new channel on Discord.