declarative_frontend.cpp jsEngine_空指针

Signed-off-by: Lby <liboyu12@huawei.com>
This commit is contained in:
Lby 2024-09-23 14:45:02 +08:00
parent 9328766a6c
commit 4e3fc0f547

View File

@ -838,13 +838,19 @@ void DeclarativeFrontend::TransferJsResponseData(int callbackId, int32_t code, s
napi_value DeclarativeFrontend::GetContextValue() napi_value DeclarativeFrontend::GetContextValue()
{ {
if (jsEngine_) {
return jsEngine_->GetContextValue(); return jsEngine_->GetContextValue();
} }
return nullptr;
}
napi_value DeclarativeFrontend::GetFrameNodeValueByNodeId(int32_t nodeId) napi_value DeclarativeFrontend::GetFrameNodeValueByNodeId(int32_t nodeId)
{ {
if (jsEngine_) {
return jsEngine_->GetFrameNodeValueByNodeId(nodeId); return jsEngine_->GetFrameNodeValueByNodeId(nodeId);
} }
return nullptr;
}
#if defined(PREVIEW) #if defined(PREVIEW)
void DeclarativeFrontend::TransferJsResponseDataPreview(int callbackId, int32_t code, ResponseData responseData) const void DeclarativeFrontend::TransferJsResponseDataPreview(int callbackId, int32_t code, ResponseData responseData) const