Commit c725a146 authored by yusukes's avatar yusukes Committed by Commit bot

Use ARC_GET_INSTANCE_FOR_METHOD for getting intent_helper instance

This is safer than manually specifying min versions.

BUG=649782
TEST=git try, manually tested files.app, context menu, and link click

Review-Url: https://codereview.chromium.org/2614173002
Cr-Commit-Position: refs/heads/master@{#442119}
parent 00591314
...@@ -34,10 +34,6 @@ namespace arc { ...@@ -34,10 +34,6 @@ namespace arc {
namespace { namespace {
constexpr uint32_t kMinVersionForHandleUrl = 2;
constexpr uint32_t kMinVersionForRequestUrlHandlerList = 2;
constexpr uint32_t kMinVersionForAddPreferredPackage = 7;
// TODO(yusukes|djacobo): Find a better way to detect a request loop and remove // TODO(yusukes|djacobo): Find a better way to detect a request loop and remove
// the global variables. // the global variables.
base::LazyInstance<GURL> g_last_url = LAZY_INSTANCE_INITIALIZER; base::LazyInstance<GURL> g_last_url = LAZY_INSTANCE_INITIALIZER;
...@@ -90,8 +86,11 @@ void OpenUrlInChrome(int render_process_host_id, ...@@ -90,8 +86,11 @@ void OpenUrlInChrome(int render_process_host_id,
void HandleUrlInArc(int render_process_host_id, void HandleUrlInArc(int render_process_host_id,
int routing_id, int routing_id,
const std::pair<GURL, std::string>& url_and_package) { const std::pair<GURL, std::string>& url_and_package) {
auto* instance = ArcIntentHelperBridge::GetIntentHelperInstance( auto* arc_service_manager = ArcServiceManager::Get();
"HandleUrl", kMinVersionForHandleUrl); if (!arc_service_manager)
return;
auto* instance = ARC_GET_INSTANCE_FOR_METHOD(
arc_service_manager->arc_bridge_service()->intent_helper(), HandleUrl);
if (!instance) if (!instance)
return; return;
...@@ -260,9 +259,15 @@ void OnIntentPickerClosed(int render_process_host_id, ...@@ -260,9 +259,15 @@ void OnIntentPickerClosed(int render_process_host_id,
// |package_name| matches a valid option and return the index. // |package_name| matches a valid option and return the index.
const size_t selected_app_index = const size_t selected_app_index =
ArcNavigationThrottle::GetAppIndex(handlers, selected_app_package); ArcNavigationThrottle::GetAppIndex(handlers, selected_app_package);
// Make sure that the instance at least supports HandleUrl. // Make sure that the instance at least supports HandleUrl.
auto* instance = ArcIntentHelperBridge::GetIntentHelperInstance( auto* arc_service_manager = ArcServiceManager::Get();
"HandleUrl", kMinVersionForHandleUrl); mojom::IntentHelperInstance* instance = nullptr;
if (arc_service_manager) {
instance = ARC_GET_INSTANCE_FOR_METHOD(
arc_service_manager->arc_bridge_service()->intent_helper(), HandleUrl);
}
if (!instance) { if (!instance) {
close_reason = ArcNavigationThrottle::CloseReason::ERROR; close_reason = ArcNavigationThrottle::CloseReason::ERROR;
} else if (close_reason == } else if (close_reason ==
...@@ -280,8 +285,10 @@ void OnIntentPickerClosed(int render_process_host_id, ...@@ -280,8 +285,10 @@ void OnIntentPickerClosed(int render_process_host_id,
switch (close_reason) { switch (close_reason) {
case ArcNavigationThrottle::CloseReason::ALWAYS_PRESSED: { case ArcNavigationThrottle::CloseReason::ALWAYS_PRESSED: {
if (ArcIntentHelperBridge::GetIntentHelperInstance( DCHECK(arc_service_manager);
"AddPreferredPackage", kMinVersionForAddPreferredPackage)) { if (ARC_GET_INSTANCE_FOR_METHOD(
arc_service_manager->arc_bridge_service()->intent_helper(),
AddPreferredPackage)) {
instance->AddPreferredPackage( instance->AddPreferredPackage(
handlers[selected_app_index]->package_name); handlers[selected_app_index]->package_name);
} }
...@@ -328,7 +335,7 @@ void OnAppIconsReceived( ...@@ -328,7 +335,7 @@ void OnAppIconsReceived(
std::unique_ptr<ActivityIconLoader::ActivityToIconsMap> icons) { std::unique_ptr<ActivityIconLoader::ActivityToIconsMap> icons) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI); DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
using AppInfo = arc::ArcNavigationThrottle::AppInfo; using AppInfo = ArcNavigationThrottle::AppInfo;
std::vector<AppInfo> app_info; std::vector<AppInfo> app_info;
for (const auto& handler : handlers) { for (const auto& handler : handlers) {
...@@ -356,8 +363,15 @@ void OnUrlHandlerList(int render_process_host_id, ...@@ -356,8 +363,15 @@ void OnUrlHandlerList(int render_process_host_id,
std::vector<mojom::IntentHandlerInfoPtr> handlers) { std::vector<mojom::IntentHandlerInfoPtr> handlers) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI); DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
auto* instance = ArcIntentHelperBridge::GetIntentHelperInstance( auto* arc_service_manager = ArcServiceManager::Get();
"HandleUrl", kMinVersionForHandleUrl); if (!arc_service_manager) {
// ARC is not running anymore. Show the Chrome OS dialog.
ShowFallbackExternalProtocolDialog(render_process_host_id, routing_id, url);
return;
}
auto* instance = ARC_GET_INSTANCE_FOR_METHOD(
arc_service_manager->arc_bridge_service()->intent_helper(), HandleUrl);
scoped_refptr<ActivityIconLoader> icon_loader = GetIconLoader(); scoped_refptr<ActivityIconLoader> icon_loader = GetIconLoader();
if (!instance || !icon_loader) { if (!instance || !icon_loader) {
...@@ -457,11 +471,16 @@ bool RunArcExternalProtocolDialog(const GURL& url, ...@@ -457,11 +471,16 @@ bool RunArcExternalProtocolDialog(const GURL& url,
return false; return false;
} }
auto* instance = ArcIntentHelperBridge::GetIntentHelperInstance( auto* arc_service_manager = ArcServiceManager::Get();
"RequestUrlHandlerList", kMinVersionForRequestUrlHandlerList); if (!arc_service_manager)
if (!instance)
return false; // ARC is either not supported or not yet ready. return false; // ARC is either not supported or not yet ready.
auto* instance = ARC_GET_INSTANCE_FOR_METHOD(
arc_service_manager->arc_bridge_service()->intent_helper(),
RequestUrlHandlerList);
if (!instance)
return false; // the same.
WebContents* web_contents = WebContents* web_contents =
tab_util::GetWebContentsByID(render_process_host_id, routing_id); tab_util::GetWebContentsByID(render_process_host_id, routing_id);
if (!web_contents || !web_contents->GetBrowserContext() || if (!web_contents || !web_contents->GetBrowserContext() ||
......
...@@ -27,10 +27,6 @@ namespace arc { ...@@ -27,10 +27,6 @@ namespace arc {
namespace { namespace {
constexpr uint32_t kMinVersionForHandleUrl = 2;
constexpr uint32_t kMinVersionForRequestUrlHandlerList = 2;
constexpr uint32_t kMinVersionForAddPreferredPackage = 7;
scoped_refptr<ActivityIconLoader> GetIconLoader() { scoped_refptr<ActivityIconLoader> GetIconLoader() {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI); DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
ArcServiceManager* arc_service_manager = ArcServiceManager::Get(); ArcServiceManager* arc_service_manager = ArcServiceManager::Get();
...@@ -182,7 +178,9 @@ ArcNavigationThrottle::HandleRequest() { ...@@ -182,7 +178,9 @@ ArcNavigationThrottle::HandleRequest() {
return content::NavigationThrottle::PROCEED; return content::NavigationThrottle::PROCEED;
ArcServiceManager* arc_service_manager = ArcServiceManager::Get(); ArcServiceManager* arc_service_manager = ArcServiceManager::Get();
DCHECK(arc_service_manager); if (!arc_service_manager)
return content::NavigationThrottle::PROCEED;
scoped_refptr<LocalActivityResolver> local_resolver = scoped_refptr<LocalActivityResolver> local_resolver =
arc_service_manager->activity_resolver(); arc_service_manager->activity_resolver();
if (local_resolver->ShouldChromeHandleUrl(url)) { if (local_resolver->ShouldChromeHandleUrl(url)) {
...@@ -191,8 +189,9 @@ ArcNavigationThrottle::HandleRequest() { ...@@ -191,8 +189,9 @@ ArcNavigationThrottle::HandleRequest() {
return content::NavigationThrottle::PROCEED; return content::NavigationThrottle::PROCEED;
} }
auto* instance = ArcIntentHelperBridge::GetIntentHelperInstance( auto* instance = ARC_GET_INSTANCE_FOR_METHOD(
"RequestUrlHandlerList", kMinVersionForRequestUrlHandlerList); arc_service_manager->arc_bridge_service()->intent_helper(),
RequestUrlHandlerList);
if (!instance) if (!instance)
return content::NavigationThrottle::PROCEED; return content::NavigationThrottle::PROCEED;
instance->RequestUrlHandlerList( instance->RequestUrlHandlerList(
...@@ -296,8 +295,13 @@ void ArcNavigationThrottle::OnIntentPickerClosed( ...@@ -296,8 +295,13 @@ void ArcNavigationThrottle::OnIntentPickerClosed(
previous_user_action_ = close_reason; previous_user_action_ = close_reason;
// Make sure that the instance at least supports HandleUrl. // Make sure that the instance at least supports HandleUrl.
auto* instance = ArcIntentHelperBridge::GetIntentHelperInstance( auto* arc_service_manager = ArcServiceManager::Get();
"HandleUrl", kMinVersionForHandleUrl); mojom::IntentHelperInstance* instance = nullptr;
if (arc_service_manager) {
instance = ARC_GET_INSTANCE_FOR_METHOD(
arc_service_manager->arc_bridge_service()->intent_helper(), HandleUrl);
}
// Since we are selecting an app by its package name, we need to locate it // Since we are selecting an app by its package name, we need to locate it
// on the |handlers| structure before sending the IPC to ARC. // on the |handlers| structure before sending the IPC to ARC.
const size_t selected_app_index = GetAppIndex(handlers, selected_app_package); const size_t selected_app_index = GetAppIndex(handlers, selected_app_package);
...@@ -323,8 +327,10 @@ void ArcNavigationThrottle::OnIntentPickerClosed( ...@@ -323,8 +327,10 @@ void ArcNavigationThrottle::OnIntentPickerClosed(
case CloseReason::ALWAYS_PRESSED: { case CloseReason::ALWAYS_PRESSED: {
// Call AddPreferredPackage if it is supported. Reusing the same // Call AddPreferredPackage if it is supported. Reusing the same
// |instance| is okay. // |instance| is okay.
if (ArcIntentHelperBridge::GetIntentHelperInstance( DCHECK(arc_service_manager);
"AddPreferredPackage", kMinVersionForAddPreferredPackage)) { if (ARC_GET_INSTANCE_FOR_METHOD(
arc_service_manager->arc_bridge_service()->intent_helper(),
AddPreferredPackage)) {
instance->AddPreferredPackage( instance->AddPreferredPackage(
handlers[selected_app_index]->package_name); handlers[selected_app_index]->package_name);
} }
......
...@@ -33,26 +33,8 @@ namespace file_tasks { ...@@ -33,26 +33,8 @@ namespace file_tasks {
namespace { namespace {
constexpr int kArcIntentHelperVersionWithUrlListSupport = 4;
constexpr int kArcIntentHelperVersionWithFullActivityName = 5;
constexpr char kAppIdSeparator = '/'; constexpr char kAppIdSeparator = '/';
// Returns the Mojo interface for ARC Intent Helper, with version |minVersion|
// or above. If the ARC bridge is not established, returns null.
arc::mojom::IntentHelperInstance* GetArcIntentHelper(
Profile* profile,
const std::string& method_name_for_logging,
uint32_t min_version) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
// File manager in secondary profile cannot access ARC.
if (!chromeos::ProfileHelper::IsPrimaryProfile(profile))
return nullptr;
return arc::ArcIntentHelperBridge::GetIntentHelperInstance(
method_name_for_logging, min_version);
}
// Returns the icon loader that wraps the Mojo interface for ARC Intent Helper. // Returns the icon loader that wraps the Mojo interface for ARC Intent Helper.
scoped_refptr<arc::ActivityIconLoader> GetArcActivityIconLoader() { scoped_refptr<arc::ActivityIconLoader> GetArcActivityIconLoader() {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI); DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
...@@ -189,9 +171,16 @@ void FindArcTasks(Profile* profile, ...@@ -189,9 +171,16 @@ void FindArcTasks(Profile* profile,
const FindTasksCallback& callback) { const FindTasksCallback& callback) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI); DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
arc::mojom::IntentHelperInstance* arc_intent_helper = arc::mojom::IntentHelperInstance* arc_intent_helper = nullptr;
GetArcIntentHelper(profile, "RequestUrlListHandlerList", // File manager in secondary profile cannot access ARC.
kArcIntentHelperVersionWithUrlListSupport); if (chromeos::ProfileHelper::IsPrimaryProfile(profile)) {
auto* arc_service_manager = arc::ArcServiceManager::Get();
if (arc_service_manager) {
arc_intent_helper = ARC_GET_INSTANCE_FOR_METHOD(
arc_service_manager->arc_bridge_service()->intent_helper(),
RequestUrlListHandlerList);
}
}
if (!arc_intent_helper) { if (!arc_intent_helper) {
callback.Run(std::move(result_list)); callback.Run(std::move(result_list));
return; return;
...@@ -228,9 +217,16 @@ bool ExecuteArcTask(Profile* profile, ...@@ -228,9 +217,16 @@ bool ExecuteArcTask(Profile* profile,
DCHECK_CURRENTLY_ON(content::BrowserThread::UI); DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
DCHECK_EQ(file_urls.size(), mime_types.size()); DCHECK_EQ(file_urls.size(), mime_types.size());
arc::mojom::IntentHelperInstance* const arc_intent_helper = arc::mojom::IntentHelperInstance* arc_intent_helper = nullptr;
GetArcIntentHelper(profile, "HandleUrlList", // File manager in secondary profile cannot access ARC.
kArcIntentHelperVersionWithFullActivityName); if (chromeos::ProfileHelper::IsPrimaryProfile(profile)) {
auto* arc_service_manager = arc::ArcServiceManager::Get();
if (arc_service_manager) {
arc_intent_helper = ARC_GET_INSTANCE_FOR_METHOD(
arc_service_manager->arc_bridge_service()->intent_helper(),
HandleUrlList);
}
}
if (!arc_intent_helper) if (!arc_intent_helper)
return false; return false;
......
...@@ -28,14 +28,27 @@ constexpr size_t kLargeIconSizeInDip = 20; ...@@ -28,14 +28,27 @@ constexpr size_t kLargeIconSizeInDip = 20;
constexpr size_t kMaxIconSizeInPx = 200; constexpr size_t kMaxIconSizeInPx = 200;
constexpr char kPngDataUrlPrefix[] = "data:image/png;base64,"; constexpr char kPngDataUrlPrefix[] = "data:image/png;base64,";
constexpr int kMinInstanceVersion = 3; // see intent_helper.mojom
ui::ScaleFactor GetSupportedScaleFactor() { ui::ScaleFactor GetSupportedScaleFactor() {
std::vector<ui::ScaleFactor> scale_factors = ui::GetSupportedScaleFactors(); std::vector<ui::ScaleFactor> scale_factors = ui::GetSupportedScaleFactors();
DCHECK(!scale_factors.empty()); DCHECK(!scale_factors.empty());
return scale_factors.back(); return scale_factors.back();
} }
// Returns an instance for calling RequestActivityIcons().
mojom::IntentHelperInstance* GetInstanceForRequestActivityIcons(
ArcIntentHelperBridge::GetResult* out_error_code) {
if (!ArcIntentHelperBridge::IsIntentHelperAvailable(out_error_code))
return nullptr;
auto* instance = ARC_GET_INSTANCE_FOR_METHOD(
ArcServiceManager::Get()->arc_bridge_service()->intent_helper(),
RequestActivityIcons);
if (!instance && out_error_code) {
*out_error_code =
ArcIntentHelperBridge::GetResult::FAILED_ARC_NOT_SUPPORTED;
}
return instance;
}
} // namespace } // namespace
ActivityIconLoader::Icons::Icons( ActivityIconLoader::Icons::Icons(
...@@ -97,8 +110,7 @@ ActivityIconLoader::GetResult ActivityIconLoader::GetActivityIcons( ...@@ -97,8 +110,7 @@ ActivityIconLoader::GetResult ActivityIconLoader::GetActivityIcons(
} }
ArcIntentHelperBridge::GetResult error_code; ArcIntentHelperBridge::GetResult error_code;
auto* instance = ArcIntentHelperBridge::GetIntentHelperInstanceWithErrorCode( auto* instance = GetInstanceForRequestActivityIcons(&error_code);
"RequestActivityIcons", kMinInstanceVersion, &error_code);
if (!instance) { if (!instance) {
// The mojo channel is not yet ready (or not supported at all). Run the // The mojo channel is not yet ready (or not supported at all). Run the
// callback with |result| that could be empty. // callback with |result| that could be empty.
......
...@@ -126,11 +126,7 @@ ArcIntentHelperBridge::FilterOutIntentHelper( ...@@ -126,11 +126,7 @@ ArcIntentHelperBridge::FilterOutIntentHelper(
} }
// static // static
mojom::IntentHelperInstance* bool ArcIntentHelperBridge::IsIntentHelperAvailable(GetResult* out_error_code) {
ArcIntentHelperBridge::GetIntentHelperInstanceWithErrorCode(
const std::string& method_name_for_logging,
uint32_t min_instance_version,
GetResult* out_error_code) {
auto* arc_service_manager = ArcServiceManager::Get(); auto* arc_service_manager = ArcServiceManager::Get();
if (!arc_service_manager) { if (!arc_service_manager) {
if (!ArcBridgeService::GetEnabled(base::CommandLine::ForCurrentProcess())) { if (!ArcBridgeService::GetEnabled(base::CommandLine::ForCurrentProcess())) {
...@@ -142,7 +138,7 @@ ArcIntentHelperBridge::GetIntentHelperInstanceWithErrorCode( ...@@ -142,7 +138,7 @@ ArcIntentHelperBridge::GetIntentHelperInstanceWithErrorCode(
if (out_error_code) if (out_error_code)
*out_error_code = GetResult::FAILED_ARC_NOT_READY; *out_error_code = GetResult::FAILED_ARC_NOT_READY;
} }
return nullptr; return false;
} }
auto* intent_helper_holder = auto* intent_helper_holder =
...@@ -151,26 +147,10 @@ ArcIntentHelperBridge::GetIntentHelperInstanceWithErrorCode( ...@@ -151,26 +147,10 @@ ArcIntentHelperBridge::GetIntentHelperInstanceWithErrorCode(
VLOG(2) << "ARC intent helper instance is not ready."; VLOG(2) << "ARC intent helper instance is not ready.";
if (out_error_code) if (out_error_code)
*out_error_code = GetResult::FAILED_ARC_NOT_READY; *out_error_code = GetResult::FAILED_ARC_NOT_READY;
return nullptr; return false;
}
// TODO(lhchavez): Stop calling GetInstanceForVersion() directly.
auto* instance = intent_helper_holder->GetInstanceForVersion(
min_instance_version, method_name_for_logging.c_str());
if (!instance) {
if (out_error_code)
*out_error_code = GetResult::FAILED_ARC_NOT_SUPPORTED;
return nullptr;
} }
return instance;
}
// static return true;
mojom::IntentHelperInstance* ArcIntentHelperBridge::GetIntentHelperInstance(
const std::string& method_name_for_logging,
uint32_t min_instance_version) {
return GetIntentHelperInstanceWithErrorCode(method_name_for_logging,
min_instance_version, nullptr);
} }
void ArcIntentHelperBridge::OnIntentFiltersUpdated( void ArcIntentHelperBridge::OnIntentFiltersUpdated(
......
...@@ -82,17 +82,9 @@ class ArcIntentHelperBridge ...@@ -82,17 +82,9 @@ class ArcIntentHelperBridge
static std::vector<mojom::IntentHandlerInfoPtr> FilterOutIntentHelper( static std::vector<mojom::IntentHandlerInfoPtr> FilterOutIntentHelper(
std::vector<mojom::IntentHandlerInfoPtr> handlers); std::vector<mojom::IntentHandlerInfoPtr> handlers);
// Gets the mojo instance if it's available. On failure, returns nullptr and // Checks if the intent helper interface is available. When it is not, returns
// updates |out_error_code| if it's not nullptr. // false and updates |out_error_code| if it's not nullptr.
static mojom::IntentHelperInstance* GetIntentHelperInstanceWithErrorCode( static bool IsIntentHelperAvailable(GetResult* out_error_code);
const std::string& method_name_for_logging,
uint32_t min_instance_version,
GetResult* out_error_code);
// Does the same as above without asking for the error code.
static mojom::IntentHelperInstance* GetIntentHelperInstance(
const std::string& method_name_for_logging,
uint32_t min_instance_version);
static const char kArcIntentHelperPackageName[]; static const char kArcIntentHelperPackageName[];
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include "base/bind.h" #include "base/bind.h"
#include "components/arc/arc_bridge_service.h" #include "components/arc/arc_bridge_service.h"
#include "components/arc/arc_service_manager.h"
#include "components/arc/intent_helper/arc_intent_helper_bridge.h" #include "components/arc/intent_helper/arc_intent_helper_bridge.h"
#include "components/google/core/browser/google_util.h" #include "components/google/core/browser/google_util.h"
#include "url/gurl.h" #include "url/gurl.h"
...@@ -18,7 +19,6 @@ namespace arc { ...@@ -18,7 +19,6 @@ namespace arc {
namespace { namespace {
constexpr int kMinInstanceVersion = 2; // see intent_helper.mojom
constexpr int kMaxValueLen = 2048; constexpr int kMaxValueLen = 2048;
bool GetQueryValue(const GURL& url, bool GetQueryValue(const GURL& url,
...@@ -55,8 +55,12 @@ LinkHandlerModelImpl::LinkHandlerModelImpl( ...@@ -55,8 +55,12 @@ LinkHandlerModelImpl::LinkHandlerModelImpl(
LinkHandlerModelImpl::~LinkHandlerModelImpl() {} LinkHandlerModelImpl::~LinkHandlerModelImpl() {}
bool LinkHandlerModelImpl::Init(const GURL& url) { bool LinkHandlerModelImpl::Init(const GURL& url) {
auto* instance = ArcIntentHelperBridge::GetIntentHelperInstance( auto* arc_service_manager = ArcServiceManager::Get();
"RequestUrlHandlerList", kMinInstanceVersion); if (!arc_service_manager)
return false;
auto* instance = ARC_GET_INSTANCE_FOR_METHOD(
arc_service_manager->arc_bridge_service()->intent_helper(),
RequestUrlHandlerList);
if (!instance) if (!instance)
return false; return false;
...@@ -77,8 +81,11 @@ void LinkHandlerModelImpl::AddObserver(Observer* observer) { ...@@ -77,8 +81,11 @@ void LinkHandlerModelImpl::AddObserver(Observer* observer) {
void LinkHandlerModelImpl::OpenLinkWithHandler(const GURL& url, void LinkHandlerModelImpl::OpenLinkWithHandler(const GURL& url,
uint32_t handler_id) { uint32_t handler_id) {
auto* instance = ArcIntentHelperBridge::GetIntentHelperInstance( auto* arc_service_manager = ArcServiceManager::Get();
"HandleUrl", kMinInstanceVersion); if (!arc_service_manager)
return;
auto* instance = ARC_GET_INSTANCE_FOR_METHOD(
arc_service_manager->arc_bridge_service()->intent_helper(), HandleUrl);
if (!instance) if (!instance)
return; return;
if (handler_id >= handlers_.size()) if (handler_id >= handlers_.size())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment