Commit dfd3f96
committed
Fix desktop test title capture after process exit
Previously, window title capture would continue running even after
process termination was initiated. This occurred because the capture
loop only checked the `isDone` flag, which is set after termination
completes, not when it begins.
This bug caused:
- Unnecessary processing during termination grace period
- Potential race conditions when accessing process resources
- Attempts to capture titles from already-terminated processes
The fix introduces a cancelCapture function that checks both
`isDone` and `explicitlyKilled` flags, stopping title capture
immediately when either termination process begins, not just after
it completes.1 parent 757834f commit dfd3f96
File tree
1 file changed
+28
-7
lines changed- tests/checks/desktop-runtime-errors/check-desktop-runtime-errors/app
1 file changed
+28
-7
lines changedLines changed: 28 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
86 | 109 | | |
87 | 110 | | |
88 | 111 | | |
| |||
95 | 118 | | |
96 | 119 | | |
97 | 120 | | |
98 | | - | |
99 | | - | |
100 | | - | |
| 121 | + | |
101 | 122 | | |
102 | 123 | | |
103 | | - | |
| 124 | + | |
104 | 125 | | |
105 | 126 | | |
106 | 127 | | |
| |||
0 commit comments