Commit d9f8189
fix: avoid premature context cancellation when navigation returns a value
Replace the SetContext-based NotifyDestroyed call (which raced with async
response processing) with a Frame.FrameNavigated subscription. Chrome
sends callFunctionOn responses before Page.frameNavigated, so signalling
destruction from FrameNavigated guarantees valid return values are
already resolved before cancellation fires.
Fixes ShouldNotThrowAnErrorWhenEvaluationDoesANavigation hang introduced
by the previous context-destruction fix.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 19d0863 commit d9f8189
1 file changed
Lines changed: 19 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
50 | 55 | | |
51 | 56 | | |
52 | 57 | | |
| |||
211 | 216 | | |
212 | 217 | | |
213 | 218 | | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
214 | 225 | | |
215 | 226 | | |
216 | 227 | | |
| |||
286 | 297 | | |
287 | 298 | | |
288 | 299 | | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | 300 | | |
294 | | - | |
295 | | - | |
296 | 301 | | |
297 | 302 | | |
298 | 303 | | |
299 | 304 | | |
300 | 305 | | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
301 | 314 | | |
302 | 315 | | |
303 | 316 | | |
| |||
0 commit comments