Skip to content

Conversation

@mdebbar
Copy link
Contributor

@mdebbar mdebbar commented Aug 5, 2025

Based on Gemini's comment: #173072 (comment)

@mdebbar mdebbar requested a review from justinmc August 5, 2025 17:48
@github-actions github-actions bot added engine flutter/engine related. See also e: labels. platform-web Web applications specifically labels Aug 5, 2025
Copy link
Contributor

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

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 addresses a potential race condition in the ClickDebouncer. The fix is straightforward and correct: it adds a check to ensure that debouncing has not been cancelled before proceeding with setting the debouncer state. The newly added test case is comprehensive and accurately simulates the race condition, confirming the effectiveness of the fix. The changes are well-implemented and improve the robustness of the pointer event handling.

Copy link
Contributor

@justinmc justinmc left a comment

Choose a reason for hiding this comment

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

LGTM 👍

///
/// This method is called asynchronously from [_maybeStartDebouncing].
void _doStartDebouncing(DomEvent event, List<ui.PointerData> data) {
// It's possible that debouncing was cancelled between the pointerdown event and the execution
Copy link
Contributor

Choose a reason for hiding this comment

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

@mdebbar mdebbar added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 5, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Aug 5, 2025
Merged via the queue into flutter:master with commit 59fc766 Aug 5, 2025
177 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Aug 5, 2025
danilozhang pushed a commit to danilozhang/flutter that referenced this pull request Aug 6, 2025
@mdebbar mdebbar deleted the debounce_race_condition branch August 6, 2025 16:16
ksokolovskyi pushed a commit to ksokolovskyi/flutter that referenced this pull request Aug 19, 2025
mboetger pushed a commit to mboetger/flutter that referenced this pull request Sep 18, 2025
korca0220 pushed a commit to korca0220/flutter that referenced this pull request Sep 22, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 12, 2025
lucaantonelli pushed a commit to lucaantonelli/flutter that referenced this pull request Nov 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engine flutter/engine related. See also e: labels. platform-web Web applications specifically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants