From d4026a25afca02bad5fb85d0f2768604ddb3c3ca Mon Sep 17 00:00:00 2001 From: etkmao Date: Thu, 23 Nov 2023 15:42:48 +0800 Subject: [PATCH] fix(core): JSCCtx CreateObject crash protect --- driver/js/src/napi/jsc/jsc_ctx.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver/js/src/napi/jsc/jsc_ctx.cc b/driver/js/src/napi/jsc/jsc_ctx.cc index 71ab2905343..02062c3b310 100644 --- a/driver/js/src/napi/jsc/jsc_ctx.cc +++ b/driver/js/src/napi/jsc/jsc_ctx.cc @@ -793,7 +793,7 @@ std::shared_ptr JSCCtx::CreateObject(const std::unordered_map(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);