diff --git a/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/Edge.java b/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/Edge.java index d5fbdc7896..fcd3e165e3 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/Edge.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/Edge.java @@ -439,6 +439,11 @@ boolean isWebView_13Available() { void scheduleWebViewTask(Runnable action) { lastWebViewTask = lastWebViewTask.thenRun(() -> { action.run(); + }).orTimeout(5, TimeUnit.SECONDS); + lastWebViewTask.whenComplete((result, exception) -> { + if (exception != null) { + exception.printStackTrace(); + } }); } diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_Browser.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_Browser.java index f76da4c2d7..908026ede7 100644 --- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_Browser.java +++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_Browser.java @@ -302,7 +302,7 @@ private int reportOpenedDescriptors() { } private Browser createBrowser(Shell s, int flags) { - long maximumBrowserCreationMilliseconds = 90_000; + long maximumBrowserCreationMilliseconds = 10_000; long createStartTime = System.currentTimeMillis(); Browser b = new Browser(s, flags); // Wait for asynchronous initialization via getting URL