Commit 6dde91b
committed
Fix data race bug: floating windows could stuck in a corner
#1987
AeroSpace has idempotent architecture: hideInCorner can be called multiple times. isHiddenInCorner serves as guard
against writing invalid values to prevUnhiddenProportionalPositionInsideWorkspaceRect. We should make sure that there
are no suspension points between the guard check and the prevUnhiddenProportionalPositionInsideWorkspaceRect assignment.
Kudos to the community for finding this bug and the root cause. Specifically to:
- https://github.com/fbuetler (#1875 (comment))
- https://github.com/tweezerticle (#1875 (comment))
- https://github.com/buacanning (#1985)
(cherry picked from commit 90a7c67)1 parent 8a49e10 commit 6dde91b
1 file changed
Lines changed: 9 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
129 | | - | |
| 128 | + | |
130 | 129 | | |
131 | 130 | | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
137 | 139 | | |
138 | 140 | | |
139 | 141 | | |
| |||
0 commit comments