[pigeon] Fixes potential race condition caused by a ProxyApi constructor message call being made in an async method#8656
Merged
auto-submit[bot] merged 8 commits intoflutter:mainfrom Feb 18, 2025
Conversation
stuartmorgan-g
approved these changes
Feb 18, 2025
Collaborator
stuartmorgan-g
left a comment
There was a problem hiding this comment.
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?>?; |
Collaborator
There was a problem hiding this comment.
This variable name (${varNamePrefix}sendFuture) should be a local variable used in the two places, since it needs to match.
Contributor
Author
|
@stuartmorgan I could only reproduce it when I added a I wasn't able to reproduce it without |
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Feb 19, 2025
…constructor message call being made in an async method (flutter/packages#8656)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Feb 19, 2025
…constructor message call being made in an async method (flutter/packages#8656)
11 tasks
github-merge-queue bot
pushed a commit
to flutter/flutter
that referenced
this pull request
Feb 19, 2025
flutter/packages@cb4fb13...a9b9172 2025-02-19 joonas.kerttula@codemate.com [google_maps_flutter] Platform interface for camera animation duration (flutter/packages#8596) 2025-02-18 stuartmorgan@google.com [various] Update Pigeon for task queue changes (flutter/packages#8654) 2025-02-18 10687576+bparrishMines@users.noreply.github.com [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 flutter-ecosystem@google.com 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
auto-submit bot
pushed a commit
that referenced
this pull request
Feb 20, 2025
…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.
androidseb
pushed a commit
to androidseb/packages
that referenced
this pull request
Jun 8, 2025
…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
androidseb
pushed a commit
to androidseb/packages
that referenced
this pull request
Jun 8, 2025
…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.
FMorschel
pushed a commit
to FMorschel/packages
that referenced
this pull request
Jun 9, 2025
…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
FMorschel
pushed a commit
to FMorschel/packages
that referenced
this pull request
Jun 9, 2025
…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.
Jyndigo
pushed a commit
to uesp/wkwebview_flutter
that referenced
this pull request
Jun 24, 2025
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.