Commit 1734696
committed
[Win32] Spin event loop in Edge instead of only processing OS messages
Before recent improvements of the Edge implementation, it was possible
that a browser instance was disposed during WebView initialization,
which made the initialization fail exceptionally. This has been
worked around by not processing all kinds of asynchronously scheduled
events (like a disposal) while waiting for WebView initialization but
only those being processes by the OS event queue. This was still
necessary to process the OS callbacks for WebView initialization and
other operations.
In some cases, this may lead to an Edge browser instance blocking the UI
thread, as some asynchronously scheduled tasks need to be processed but
are not. In addition, enhancements of the Edge implementation made the
initialization happen asynchronously anyway, such that the browser
instantiation itself cannot throw an error anymore, but the
asynchronously happening initialization is now capable of processing
asynchronous browser disposals.
This change simplifies the event processing inside Edge to not only
process the next OS message but to just ordinarily spin the event loop.
This reduces the risk of operations executed on an Edge browser to block
execution.1 parent 081eb9b commit 1734696
File tree
2 files changed
+14
-22
lines changed- bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser
- tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit
2 files changed
+14
-22
lines changedLines changed: 5 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | | - | |
| 264 | + | |
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
284 | | - | |
| 284 | + | |
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
| |||
444 | 444 | | |
445 | 445 | | |
446 | 446 | | |
447 | | - | |
| 447 | + | |
448 | 448 | | |
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
| 453 | + | |
466 | 454 | | |
467 | | - | |
468 | | - | |
| 455 | + | |
469 | 456 | | |
470 | 457 | | |
471 | | - | |
472 | 458 | | |
473 | 459 | | |
474 | 460 | | |
| |||
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
305 | | - | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
306 | 310 | | |
307 | 311 | | |
308 | 312 | | |
309 | | - | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
310 | 316 | | |
311 | 317 | | |
312 | 318 | | |
| |||
334 | 340 | | |
335 | 341 | | |
336 | 342 | | |
337 | | - | |
| 343 | + | |
338 | 344 | | |
339 | 345 | | |
340 | 346 | | |
| |||
0 commit comments