Skip to content

Commit

Permalink
fix(core): try fix ios hash throw overflow crash (#4166)
Browse files Browse the repository at this point in the history
  • Loading branch information
etkmao authored Jan 6, 2025
1 parent 9a4674c commit aa929a1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions driver/js/src/napi/jsc/jsc_ctx.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,12 @@ JSValueRef InvokeJsCallback(JSContextRef ctx,
auto object_private_data = JSObjectGetPrivate(object);
if (object_private_data) {
auto constructor_data = reinterpret_cast<ConstructorData*>(object_private_data);
auto object_data = constructor_data->object_data_map[object];
cb_info.SetData(object_data);
auto it = constructor_data->object_data_map.find(object);
if (it != constructor_data->object_data_map.end()) {
cb_info.SetData(it->second);
} else {
cb_info.SetData(nullptr);
}
}
}
for (size_t i = 0; i < argument_count; i++) {
Expand Down

0 comments on commit aa929a1

Please sign in to comment.