diff --git a/frameworks/bridge/declarative_frontend/jsview/js_web.cpp b/frameworks/bridge/declarative_frontend/jsview/js_web.cpp index 2bc4ce0512d93310154f37ae8a05ebcb375f138d..4424c31244357cb47b0356682e6f83b71f69647b 100644 --- a/frameworks/bridge/declarative_frontend/jsview/js_web.cpp +++ b/frameworks/bridge/declarative_frontend/jsview/js_web.cpp @@ -2339,11 +2339,8 @@ void JSWeb::OnSslErrorRequest(const JSCallbackInfo& args) ContainerScope scope(instanceId); JAVASCRIPT_EXECUTION_SCOPE_WITH_CHECK(execCtx, false); auto* eventInfo = TypeInfoHelper::DynamicCast(info.get()); - JSRef message = func->ExecuteWithValue(*eventInfo); - if (message->IsBoolean()) { - return message->ToBoolean(); - } - return false; + func->Execute(*eventInfo); + return true; }; NG::WebView::SetOnSslErrorRequestImpl(std::move(uiCallback)); return; @@ -2359,11 +2356,8 @@ void JSWeb::OnSslErrorRequest(const JSCallbackInfo& args) LOGW("eventInfo is null"); return false; } - JSRef result = func->ExecuteWithValue(*eventInfo); - if (result->IsBoolean()) { - return result->ToBoolean(); - } - return false; + func->Execute(*eventInfo); + return true; }; auto webComponent = AceType::DynamicCast(ViewStackProcessor::GetInstance()->GetMainComponent()); CHECK_NULL_VOID(webComponent);