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
tests/cefclient/browser/default_client_handler.cc
Normal file
19
tests/cefclient/browser/default_client_handler.cc
Normal file
@@ -0,0 +1,19 @@
|
||||
// Copyright (c) 2024 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
|
||||
#include "tests/cefclient/browser/default_client_handler.h"
|
||||
|
||||
namespace client {
|
||||
|
||||
// static
|
||||
CefRefPtr<DefaultClientHandler> DefaultClientHandler::GetForClient(
|
||||
CefRefPtr<CefClient> client) {
|
||||
auto base = BaseClientHandler::GetForClient(client);
|
||||
if (base && base->GetTypeKey() == &kTypeKey) {
|
||||
return static_cast<DefaultClientHandler*>(base.get());
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
} // namespace client
|
Reference in New Issue
Block a user