mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
cefclient: Fix invalid cast to ClientHandlerStd (see #3499)
This commit is contained in:
@@ -19,6 +19,16 @@ ClientHandlerOsr::ClientHandlerOsr(Delegate* delegate,
|
||||
DCHECK(osr_delegate_);
|
||||
}
|
||||
|
||||
// static
|
||||
CefRefPtr<ClientHandlerOsr> ClientHandlerOsr::GetForClient(
|
||||
CefRefPtr<CefClient> client) {
|
||||
auto base = BaseClientHandler::GetForClient(client);
|
||||
if (base && base->GetTypeKey() == &kTypeKey) {
|
||||
return static_cast<ClientHandlerOsr*>(base.get());
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void ClientHandlerOsr::DetachOsrDelegate() {
|
||||
if (!CefCurrentlyOn(TID_UI)) {
|
||||
// Execute this method on the UI thread.
|
||||
|
Reference in New Issue
Block a user