Skip to content

Commit e22f30c

Browse files
committed
[Win32] Spin event loop in Edge instead of processing OS messages #1771
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. #1771
1 parent bff91d7 commit e22f30c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_Browser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ private Browser createBrowser(Shell s, int flags) {
295295
}
296296

297297
private Browser createBrowser(Shell s, int flags, boolean expectSuccess) {
298-
long maximumBrowserCreationMilliseconds = 20_000;
298+
long maximumBrowserCreationMilliseconds = 90_000;
299299
long createStartTime = System.currentTimeMillis();
300300
Browser b = new Browser(s, flags);
301301
// Wait for asynchronous initialization via getting URL

0 commit comments

Comments
 (0)