Skip to content

Commit

Permalink
chore(ios): remove unnecessary exception check log
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwcg committed Aug 1, 2024
1 parent 309bef2 commit d21f4e0
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions driver/js/src/napi/jsc/jsc_ctx.cc
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,6 @@ std::shared_ptr<CtxValue> JSCCtx::DefineClass(const string_view& name,
JSObjectCallAsFunction(context_, define_property, object, 3, values, &exception);
if (exception) {
SetException(std::make_shared<JSCCtxValue>(context_, exception));
FOOTSTONE_LOG(ERROR) << GetExceptionMessage(exception_);
return nullptr;
}
}
Expand Down Expand Up @@ -895,23 +894,20 @@ std::shared_ptr<CtxValue> JSCCtx::CallFunction(const std::shared_ptr<CtxValue>&
auto function_object = JSValueToObject(context_, function_value->value_, &exception);
if (exception) {
SetException(std::make_shared<JSCCtxValue>(context_, exception));
FOOTSTONE_LOG(ERROR) << GetExceptionMessage(exception_);
return nullptr;
}

auto receiver_value = std::static_pointer_cast<JSCCtxValue>(receiver);
auto receiver_object = JSValueToObject(context_, receiver_value->value_, &exception);
if (exception) {
SetException(std::make_shared<JSCCtxValue>(context_, exception));
FOOTSTONE_LOG(ERROR) << GetExceptionMessage(exception_);
return nullptr;
}

if (argc <= 0) {
auto ret_value_ref = JSObjectCallAsFunction(context_, function_object, receiver_object, 0, nullptr, &exception);
if (exception) {
SetException(std::make_shared<JSCCtxValue>(context_, exception));
FOOTSTONE_LOG(ERROR) << GetExceptionMessage(exception_);
return nullptr;
}
return std::make_shared<JSCCtxValue>(context_, ret_value_ref);
Expand All @@ -926,7 +922,6 @@ std::shared_ptr<CtxValue> JSCCtx::CallFunction(const std::shared_ptr<CtxValue>&
auto ret_value_ref = JSObjectCallAsFunction(context_, function_object, receiver_object, argc, values, &exception);
if (exception) {
SetException(std::make_shared<JSCCtxValue>(context_, exception));
FOOTSTONE_LOG(ERROR) << GetExceptionMessage(exception_);
return nullptr;
}

Expand Down Expand Up @@ -1142,7 +1137,6 @@ std::shared_ptr<CtxValue> JSCCtx::RunScript(const string_view& data,

if (exception) {
SetException(std::make_shared<JSCCtxValue>(context_, exception));
FOOTSTONE_LOG(ERROR) << GetExceptionMessage(exception_);
return nullptr;
}

Expand Down

0 comments on commit d21f4e0

Please sign in to comment.