modify gn

Signed-off-by: wangdengze <wangdengze@huawei.com>
This commit is contained in:
wangdengze 2023-12-29 14:03:05 +08:00
parent 229dde3b27
commit 36a504dfd7
2 changed files with 8 additions and 2 deletions
frameworks/js/vcard

@ -23,7 +23,6 @@
#include "base_context.h"
#include "datashare_helper.h"
#include "datashare_predicates.h"
#include "datashare_predicates_proxy.h"
#include "napi_base_context.h"
#include "napi_vcard_type.h"
#include "telephony_napi_common_error.h"

@ -20,6 +20,7 @@
#include "ability.h"
#include "core_service_client.h"
#include "iostream"
#include "js_proxy.h"
#include "napi_parameter_util.h"
#include "napi_util.h"
#include "telephony_log_wrapper.h"
@ -316,7 +317,13 @@ bool MatchExportParameters(
static DataShare::DataSharePredicates UnwrapDataSharePredicates(napi_env env, napi_value value)
{
auto predicates = DataShare::DataSharePredicatesProxy::GetNativePredicates(env, value);
if (value == nullptr) {
TELEPHONY_LOGE("value is null.");
return {};
}
JSProxy::JSProxy<DataShare::DataShareAbsPredicates> *jsProxy = nullptr;
napi_unwrap(env, value, reinterpret_cast<void **>(&jsProxy));
std::shared_ptr<DataShare::DataShareAbsPredicates> predicates = jsProxy->GetInstance();
if (predicates == nullptr) {
TELEPHONY_LOGE("GetNativePredicates is nullptr.");
return {};