Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(android): resolve local ref overflow #3902

Merged
merged 1 commit into from
Jun 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions android/sdk/src/main/jni/src/jni/convert_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ std::tuple<bool, std::string, jobject> ConvertUtils::ToHippyMap(const std::share
std::shared_ptr<CtxValue> item = v8_ctx->CopyArrayElement(array, i + 1);
auto to_jobject_tuple = ToJObject(ctx, item);
if (!std::get<0>(to_jobject_tuple)) {
j_env->DeleteLocalRef(key_j_obj);
return std::make_tuple(false, std::get<1>(to_jobject_tuple), static_cast<jobject>(nullptr));
}
jobject value_j_obj = std::get<2>(to_jobject_tuple);
Expand Down Expand Up @@ -638,6 +639,7 @@ std::tuple<bool,
} else if (!obj) {
result = ctx->CreateNull();
} else {
j_env->DeleteLocalRef(obj);
return std::make_tuple(false, "UnSupported Type in HippyArray or HippyMap",
static_cast<std::shared_ptr<CtxValue>>(nullptr));
}
Expand Down
Loading