Skip to content

Commit 3302644

Browse files
amartya4256HeikoKlare
authored andcommitted
Fix Edge::getWebViewWrapper deadlock threat #1466
This commit makes sure while calling Edge::getWebViewWrapper with waitForLastPEndingLast set to true that the method also checks for the completion of the webViewWrapperFuture before calling a join() on it, which can some time lead to deadlock as we allow forced execptional completion of lastWebViewTask on timeout. contributes to #1466
1 parent 72695f8 commit 3302644

File tree

1 file changed

+2
-1
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser

1 file changed

+2
-1
lines changed

Diff for: bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/Edge.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -405,13 +405,14 @@ private ICoreWebView2_13 initializeWebView_13(ICoreWebView2 webView) {
405405
}
406406

407407
private WebViewWrapper getWebViewWrapper(boolean waitForPendingWebviewTasksToFinish) {
408+
WebViewWrapper webViewWrapper = getWebViewWrapper();
408409
if(waitForPendingWebviewTasksToFinish) {
409410
processOSMessagesUntil(lastWebViewTask::isDone, exception -> {
410411
lastWebViewTask.completeExceptionally(exception);
411412
throw exception;
412413
}, browser.getDisplay());
413414
}
414-
return webViewWrapperFuture.join();
415+
return webViewWrapper;
415416
}
416417

417418
private WebViewWrapper getWebViewWrapper() {

0 commit comments

Comments
 (0)