未验证 提交 870b093a 编写于 作者: S stuartmorgan 提交者: GitHub

Add missing returns in system channels handlers (#21523)

The Windows and GLFW embeddings both had cases of missing returns after
calling `Error` on a method channel result object, leading to incorrect
double-calls on the result if the error paths were ever hit.
上级 93735c98
......@@ -139,6 +139,7 @@ void TextInputPlugin::HandleMethodCall(
if (client_config.IsNull()) {
result->Error(kBadArgumentError,
"Could not set client, missing arguments.");
return;
}
client_id_ = client_id_json.GetInt();
input_action_ = "";
......
......@@ -40,6 +40,7 @@ void CursorHandler::HandleMethodCall(
if (kind_iter == arguments.end()) {
result->Error("Argument error",
"Missing argument while trying to activate system cursor");
return;
}
const auto& kind = std::get<std::string>(kind_iter->second);
delegate_->UpdateFlutterCursor(kind);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册