Skip to content

Commit

Permalink
fix(dom): fix call function crash
Browse files Browse the repository at this point in the history
  • Loading branch information
ilikethese authored and hippy-actions[bot] committed Aug 8, 2023
1 parent c227cb4 commit 62af4ee
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ void CallFunction(JNIEnv* j_env,
std::any scope_object;
auto scope_id = footstone::checked_numeric_cast<jint, uint32_t>(j_scope_id);
auto flag = hippy::global_data_holder.Find(scope_id, scope_object);
FOOTSTONE_CHECK(flag);
if (!flag) {
FOOTSTONE_LOG(ERROR) << "scope can not found, scope id = " << scope_id << "!!!";
return;
}
auto scope = std::any_cast<std::shared_ptr<Scope>>(scope_object);
JsDriverUtils::CallJs(action_name, scope,
[callback](CALLFUNCTION_CB_STATE state, const string_view& msg) {
Expand Down

0 comments on commit 62af4ee

Please sign in to comment.