Skip to content

Commit

Permalink
Re-do close watcher user activation tracking
Browse files Browse the repository at this point in the history
As noted in #10046, the close watcher anti-abuse measures were overly strict, and would prevent firing the cancel event even when the close watcher was created with user interaction.

Additionally, the "is grouped with previous" infrastructure used to track close watcher groups was buggy, since close watchers could be destroyed and this would cause groups to spuriously collapse.

To fix both of these problems, we re-do the close watcher anti-abuse protections. We now track the groups as a list-of-lists, and explicitly track how many groups should be allowed at a given time. We can then compare them when making decisions about whether to group a new close watcher, or whether to fire a cancel event.

Note that the initial fix proposed in #10046 (and implemented in #10048) is incorrect, as it allows indefinite trapping of the user.

Closes #10046.
  • Loading branch information
domenic committed Mar 14, 2024
1 parent a187fec commit 335cf0c
Showing 1 changed file with 173 additions and 108 deletions.

0 comments on commit 335cf0c

Please sign in to comment.