From 42c033fb39ba4d484407950be73003044904cc60 Mon Sep 17 00:00:00 2001 From: Seungsoo Lee Date: Mon, 23 Aug 2021 16:57:23 +0900 Subject: [PATCH] Fix parsing bug for dispose method In PlatformViewChannel::HandleMethodCall, a argument for 'dispose' method includes a map. Hence, to get a proper view_id value, it should be parsed by 'id' key. --- shell/platform/tizen/channels/platform_view_channel.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/shell/platform/tizen/channels/platform_view_channel.cc b/shell/platform/tizen/channels/platform_view_channel.cc index 553d2e306db82..e0565a98794fb 100644 --- a/shell/platform/tizen/channels/platform_view_channel.cc +++ b/shell/platform/tizen/channels/platform_view_channel.cc @@ -165,10 +165,8 @@ void PlatformViewChannel::HandleMethodCall( } } else if (method == "dispose") { int view_id = -1; - if (std::holds_alternative(arguments)) { - view_id = std::get(arguments); - }; - if (view_id < 0 || view_instances_.find(view_id) == view_instances_.end()) { + if (!GetValueFromEncodableMap(arguments, "id", &view_id) || + view_instances_.find(view_id) == view_instances_.end()) { result->Error("Can't find view id"); } else { RemoveViewInstanceIfNeeded(view_id);