Skip to content

Commit

Permalink
Avoid crash on OnProtocolExecution
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
HashidaTKS committed Jan 6, 2025
1 parent e43b49c commit abf9fd7
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions client_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1910,10 +1910,18 @@ bool ClientHandler::OnSelectClientCertificate(

void ClientHandler::OnProtocolExecution(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefRequest> request, bool& allow_os_execution)
{
// do default
//CefResourceRequestHandler::OnProtocolExecution(browser,frame, request,allow_os_execution);
//return;
// Using CefBrowser->StopLoad() with allow_os_execution = true causes a crash on CEF128+.
// https://github.com/chromiumembedded/cef/issues/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.
#if CHROME_VERSION_MAJOR >= 128
allow_os_execution = false;
#else
allow_os_execution = true;
#endif
browser->StopLoad();
}
void ClientHandler::OnRenderViewReady(CefRefPtr<CefBrowser> browser)
Expand Down

0 comments on commit abf9fd7

Please # to comment.