Skip to content

Commit abf9fd7

Browse files
committed
Avoid crash on OnProtocolExecution
Using CefBrowser->StopLoad() with allow_os_execution = true causes a crash on CEF128+. chromiumembedded/cef#3851 In order to avoid the crash, specifying allow_os_execution = false on CEF128+, but this blocks to execute applications installed in OS. E.g. Zoom application for Windows. We should specify allow_os_execution = true after the bug on CEF128+ is fixed.
1 parent e43b49c commit abf9fd7

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

client_handler.cpp

+11-3
Original file line numberDiff line numberDiff line change
@@ -1910,10 +1910,18 @@ bool ClientHandler::OnSelectClientCertificate(
19101910

19111911
void ClientHandler::OnProtocolExecution(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefRequest> request, bool& allow_os_execution)
19121912
{
1913-
// do default
1914-
//CefResourceRequestHandler::OnProtocolExecution(browser,frame, request,allow_os_execution);
1915-
//return;
1913+
// Using CefBrowser->StopLoad() with allow_os_execution = true causes a crash on CEF128+.
1914+
// https://github.com/chromiumembedded/cef/issues/3851
1915+
//
1916+
// In order to avoid the crash, specifying allow_os_execution = false on CEF128+, but
1917+
// this blocks to execute applications installed in OS. E.g. Zoom application for Windows.
1918+
//
1919+
// We should specify allow_os_execution = true after the bug on CEF128+ is fixed.
1920+
#if CHROME_VERSION_MAJOR >= 128
1921+
allow_os_execution = false;
1922+
#else
19161923
allow_os_execution = true;
1924+
#endif
19171925
browser->StopLoad();
19181926
}
19191927
void ClientHandler::OnRenderViewReady(CefRefPtr<CefBrowser> browser)

0 commit comments

Comments
 (0)