Skip to content

Commit

Permalink
fix(core): JSCCtx CreateObject crash protect
Browse files Browse the repository at this point in the history
  • Loading branch information
etkmao authored and hippy-actions[bot] committed Nov 23, 2023
1 parent 73abae9 commit d4026a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion driver/js/src/napi/jsc/jsc_ctx.cc
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ std::shared_ptr<CtxValue> JSCCtx::CreateObject(const std::unordered_map<std::sha
auto object_key = JSCVM::CreateJSCString(key);
auto ctx_value = std::static_pointer_cast<JSCCtxValue>(it.second);
if (!ctx_value) {
auto error = CreateException("CreateObject2");
auto error = CreateException("CreateObject ctx_value is nullptr");
return nullptr;
}
JSObjectSetProperty(context_, obj, object_key, ctx_value->value_, kJSPropertyAttributeNone, &exception);
Expand Down

0 comments on commit d4026a2

Please sign in to comment.