mirror of
https://github.com/openharmony/ace_ace_engine.git
synced 2026-07-19 14:43:36 -04:00
!2076 0324部分ArkUi 内源审视修改
Merge pull request !2076 from kangchongtao/0324
This commit is contained in:
@@ -133,26 +133,24 @@ void AceContainer::Destroy()
|
||||
{
|
||||
ContainerScope scope(instanceId_);
|
||||
if (pipelineContext_ && taskExecutor_) {
|
||||
if (taskExecutor_) {
|
||||
// 1. Destroy Pipeline on UI thread.
|
||||
RefPtr<PipelineContext> context;
|
||||
context.Swap(pipelineContext_);
|
||||
taskExecutor_->PostTask([context]() { context->Destroy(); }, TaskExecutor::TaskType::UI);
|
||||
// 1. Destroy Pipeline on UI thread.
|
||||
RefPtr<PipelineContext> context;
|
||||
context.Swap(pipelineContext_);
|
||||
taskExecutor_->PostTask([context]() { context->Destroy(); }, TaskExecutor::TaskType::UI);
|
||||
|
||||
if (isSubContainer_) {
|
||||
// SubAcecontainer just return.
|
||||
return;
|
||||
}
|
||||
// 2. Destroy Frontend on JS thread.
|
||||
RefPtr<Frontend> frontend;
|
||||
frontend_.Swap(frontend);
|
||||
taskExecutor_->PostTask(
|
||||
[frontend]() {
|
||||
frontend->UpdateState(Frontend::State::ON_DESTROY);
|
||||
frontend->Destroy();
|
||||
},
|
||||
TaskExecutor::TaskType::JS);
|
||||
if (isSubContainer_) {
|
||||
// SubAcecontainer just return.
|
||||
return;
|
||||
}
|
||||
// 2. Destroy Frontend on JS thread.
|
||||
RefPtr<Frontend> frontend;
|
||||
frontend_.Swap(frontend);
|
||||
taskExecutor_->PostTask(
|
||||
[frontend]() {
|
||||
frontend->UpdateState(Frontend::State::ON_DESTROY);
|
||||
frontend->Destroy();
|
||||
},
|
||||
TaskExecutor::TaskType::JS);
|
||||
}
|
||||
resRegister_.Reset();
|
||||
assetManager_.Reset();
|
||||
|
||||
@@ -294,6 +294,9 @@ const WeakPtr<Element>& JsInspectorManager::GetRootElement()
|
||||
return nullptr;
|
||||
}
|
||||
auto InspectorComponentElement = GetInspectorElementById(child.front()->GetNodeId());
|
||||
if (!InspectorComponentElement) {
|
||||
return nullptr;
|
||||
}
|
||||
return InspectorComponentElement->GetElementParent();
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -155,7 +155,7 @@ foreach(item, ace_platforms) {
|
||||
}
|
||||
}
|
||||
|
||||
# Config for reduceing eh_frame section on android platform to save rom size.
|
||||
# Config for reduceing eh_frame section on aosp platform to save rom size.
|
||||
config("reduce_eh_frame_config") {
|
||||
if (!use_mingw_win && !use_mac) {
|
||||
cflags = [
|
||||
|
||||
@@ -572,7 +572,7 @@ LunarDate Localization::GetLunarDate(Date date)
|
||||
// 0 means January, 1 means February, so month + 1
|
||||
dateRet.month = static_cast<uint32_t>(lunarMonth) + 1;
|
||||
dateRet.day = static_cast<uint32_t>(lunarDate);
|
||||
dateRet.isLeapMonth = isLeapMonth == 0 ? false : true;
|
||||
dateRet.isLeapMonth = !(isLeapMonth == 0);
|
||||
return dateRet;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@@ -628,7 +628,7 @@ bool MatchResConfig(const AceResConfig& desired, const AceResConfig& supported)
|
||||
!IsResolutionMatch(desired, supported));
|
||||
}
|
||||
|
||||
bool DeclaritiveMatchResConfig(const AceResConfig& desired, const AceResConfig& supported)
|
||||
bool DeclarativeMatchResConfig(const AceResConfig& desired, const AceResConfig& supported)
|
||||
{
|
||||
return !(!IsOrientationMatch(desired, supported) || !IsDeviceTypeMatch(desired, supported));
|
||||
}
|
||||
@@ -875,7 +875,7 @@ void AceResConfig::MatchAndSortDeclarativeResConfigs(const std::set<std::string>
|
||||
int32_t candidateConfigSize = static_cast<int32_t>(matchedLocaleConfigs.size());
|
||||
std::vector<AceResConfig> matchedResConfigs;
|
||||
for (auto i = 0; i < candidateConfigSize; i++) {
|
||||
if (!DeclaritiveMatchResConfig(deviceResConfig, matchedLocaleConfigs[i])) {
|
||||
if (!DeclarativeMatchResConfig(deviceResConfig, matchedLocaleConfigs[i])) {
|
||||
continue;
|
||||
} else {
|
||||
matchedResConfigs.emplace_back(matchedLocaleConfigs[i]);
|
||||
|
||||
@@ -94,7 +94,7 @@ int32_t SubwindowManager::GetParentContainerId(int32_t containerId)
|
||||
void SubwindowManager::AddSubwindow(int32_t instanceId, RefPtr<Subwindow> subwindow)
|
||||
{
|
||||
if (!subwindow) {
|
||||
LOGE("Add subwindow failed, the subwndow is null.");
|
||||
LOGE("Add subwindow failed, the subwindow is null.");
|
||||
return;
|
||||
}
|
||||
LOGI("Add subwindow into map, instanceId is %{public}d, subwindow id is %{public}d.", instanceId,
|
||||
|
||||
@@ -734,7 +734,7 @@ bool AccessibilityNodeManager::GetDefaultAttrsByType(
|
||||
void AccessibilityNodeManager::DumpTree(int32_t depth, NodeId nodeID)
|
||||
{
|
||||
if (!DumpLog::GetInstance().GetDumpFile()) {
|
||||
LOGE("AccessibilityNodeManager::GetDumpFile fail:%p", &(DumpLog::GetInstance()));
|
||||
LOGE("AccessibilityNodeManager::GetDumpFile fail");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@@ -348,7 +348,7 @@ void DOMListItem::ResetInitializedStyle()
|
||||
if (style.IsValid() && style.padding.IsEffective()) {
|
||||
return;
|
||||
}
|
||||
// Add theme padding to item when not set customised padding.
|
||||
// Add theme padding to item when not set customized padding.
|
||||
double additionalPadding = itemTheme->GetItemPaddingInPercent();
|
||||
boxComponent_->SetPadding(Edge(), Edge(Dimension(additionalPadding, DimensionUnit::PERCENT)));
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@@ -307,7 +307,7 @@ bool DOMPickerBase::SetOptionStyleOperators(const std::pair<std::string, std::st
|
||||
return false;
|
||||
}
|
||||
|
||||
bool DOMPickerBase::SetTextBackgoundColor(const std::pair<std::string, std::string>& style)
|
||||
bool DOMPickerBase::SetTextBackgroundColor(const std::pair<std::string, std::string>& style)
|
||||
{
|
||||
if (style.first != DOM_BACKGROUND_COLOR) {
|
||||
return false;
|
||||
@@ -385,7 +385,7 @@ bool DOMPickerBase::SetTextStyleOperators(const std::pair<std::string, std::stri
|
||||
if (SetColumnHeight(style)) {
|
||||
return true;
|
||||
}
|
||||
if (SetTextBackgoundColor(style)) {
|
||||
if (SetTextBackgroundColor(style)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -83,7 +83,7 @@ private:
|
||||
|
||||
bool SetTextStyleOperators(const std::pair<std::string, std::string>& style);
|
||||
|
||||
bool SetTextBackgoundColor(const std::pair<std::string, std::string>& style);
|
||||
bool SetTextBackgroundColor(const std::pair<std::string, std::string>& style);
|
||||
bool SetColumnHeight(const std::pair<std::string, std::string>& style);
|
||||
|
||||
bool hasValue_ = true;
|
||||
|
||||
@@ -291,7 +291,7 @@ void DOMProgress::InitProgressIfNeed()
|
||||
{
|
||||
auto theme = GetTheme<ProgressTheme>();
|
||||
if (type_ == ProgressType::CIRCLE) {
|
||||
// Width_ and height_ in circluar progress are usually the same with diameter in loading progress component.
|
||||
// Width_ and height_ in circular progress are usually the same with diameter in loading progress component.
|
||||
// If width_ and height_ are different, choose smaller one as diameter.
|
||||
if (!loadingProgressChild_) {
|
||||
loadingProgressChild_ = AceType::MakeRefPtr<LoadingProgressComponent>();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@@ -53,11 +53,11 @@ RefPtr<CheckboxComponent> DOMCheckboxUtil::CreateComponentAndSetChildAttr(
|
||||
component->SetHorizontalPadding(Dimension(0));
|
||||
component->SetHotZoneVerticalPadding(Dimension(0));
|
||||
}
|
||||
if (LessOrEqual(node.GetWidth().Value(), 0.0)) {
|
||||
if (LessOrEqual(node.GetWidth().Value(), 0.0) && boxComponent) {
|
||||
node.SetWidth(theme->GetWidth());
|
||||
boxComponent->SetWidth(theme->GetWidth().Value(), theme->GetWidth().Unit());
|
||||
}
|
||||
if (LessOrEqual(node.GetHeight().Value(), 0.0)) {
|
||||
if (LessOrEqual(node.GetHeight().Value(), 0.0) && boxComponent) {
|
||||
node.SetHeight(theme->GetHeight());
|
||||
boxComponent->SetHeight(theme->GetHeight().Value(), theme->GetHeight().Unit());
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@@ -441,7 +441,7 @@ std::optional<RadialSizeType> ParseRadialGradientSize(const std::string& value)
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
// ObjectPosiotion
|
||||
// ObjectPosition
|
||||
ImageObjectPosition ParseImageObjectPosition(const std::string& value)
|
||||
{
|
||||
ImageObjectPosition imageObjectPosition;
|
||||
|
||||
+3
-3
@@ -21,7 +21,7 @@
|
||||
namespace OHOS::Ace::Framework {
|
||||
namespace {
|
||||
|
||||
JSRef<JSObject> CreareAreaObject(const Rect& rect, const Offset& origin)
|
||||
JSRef<JSObject> CreateAreaObject(const Rect& rect, const Offset& origin)
|
||||
{
|
||||
JSRef<JSObjTemplate> objectTemplate = JSRef<JSObjTemplate>::New();
|
||||
JSRef<JSObject> area = objectTemplate->NewInstance();
|
||||
@@ -47,8 +47,8 @@ JSRef<JSObject> CreareAreaObject(const Rect& rect, const Offset& origin)
|
||||
void JsOnAreaChangeFunction::Execute(
|
||||
const Rect& oldRect, const Offset& oldOrigin, const Rect& rect, const Offset& origin)
|
||||
{
|
||||
auto oldArea = CreareAreaObject(oldRect, oldOrigin);
|
||||
auto area = CreareAreaObject(rect, origin);
|
||||
auto oldArea = CreateAreaObject(oldRect, oldOrigin);
|
||||
auto area = CreateAreaObject(rect, origin);
|
||||
JSRef<JSVal> params[2];
|
||||
params[0] = oldArea;
|
||||
params[1] = area;
|
||||
|
||||
+5
-5
@@ -39,7 +39,7 @@ JSValue AppGetInfo(JSContext* ctx, JSValue value, int32_t argc, JSValueConst* ar
|
||||
{
|
||||
auto* instance = static_cast<QJSDeclarativeEngineInstance*>(JS_GetContextOpaque(ctx));
|
||||
if (instance == nullptr) {
|
||||
LOGE("Can not cast Context to QJSDelcarativeEngineInstance object.");
|
||||
LOGE("Can not cast Context to QJSDeclarativeEngineInstance object.");
|
||||
return JS_NULL;
|
||||
}
|
||||
auto delegate = instance->GetDelegate();
|
||||
@@ -63,7 +63,7 @@ JSValue AppTerminate(JSContext* ctx, JSValue value, int32_t argc, JSValueConst*
|
||||
{
|
||||
auto* instance = static_cast<QJSDeclarativeEngineInstance*>(JS_GetContextOpaque(ctx));
|
||||
if (instance == nullptr) {
|
||||
LOGE("Can not cast Context to QJSDelcarativeEngineInstance object.");
|
||||
LOGE("Can not cast Context to QJSDeclarativeEngineInstance object.");
|
||||
return JS_NULL;
|
||||
}
|
||||
auto delegate = instance->GetDelegate();
|
||||
@@ -157,7 +157,7 @@ JSValue AppSetImageCacheCount(JSContext* ctx, JSValue value, int32_t argc, JSVal
|
||||
{
|
||||
auto* instance = static_cast<QJSDeclarativeEngineInstance*>(JS_GetContextOpaque(ctx));
|
||||
if (instance == nullptr) {
|
||||
LOGE("Can not cast Context to QJSDelcarativeEngineInstance object.");
|
||||
LOGE("Can not cast Context to QJSDeclarativeEngineInstance object.");
|
||||
return JS_NULL;
|
||||
}
|
||||
auto delegate = instance->GetDelegate();
|
||||
@@ -193,7 +193,7 @@ JSValue AppSetImageRawDataCacheSize(JSContext* ctx, JSValue value, int32_t argc,
|
||||
{
|
||||
auto* instance = static_cast<QJSDeclarativeEngineInstance*>(JS_GetContextOpaque(ctx));
|
||||
if (instance == nullptr) {
|
||||
LOGE("Can not cast Context to QJSDelcarativeEngineInstance object.");
|
||||
LOGE("Can not cast Context to QJSDeclarativeEngineInstance object.");
|
||||
return JS_NULL;
|
||||
}
|
||||
auto delegate = instance->GetDelegate();
|
||||
@@ -229,7 +229,7 @@ JSValue AppSetImageFileCacheSize(JSContext* ctx, JSValue value, int32_t argc, JS
|
||||
{
|
||||
auto* instance = static_cast<QJSDeclarativeEngineInstance*>(JS_GetContextOpaque(ctx));
|
||||
if (instance == nullptr) {
|
||||
LOGE("Can not cast Context to QJSDelcarativeEngineInstance object.");
|
||||
LOGE("Can not cast Context to QJSDeclarativeEngineInstance object.");
|
||||
return JS_NULL;
|
||||
}
|
||||
auto delegate = instance->GetDelegate();
|
||||
|
||||
@@ -190,7 +190,7 @@ JSValue PageGetParams(JSContext* ctx, JSValueConst value, int32_t argc, JSValueC
|
||||
{
|
||||
auto* instance = static_cast<QJSDeclarativeEngineInstance*>(JS_GetContextOpaque(ctx));
|
||||
if (instance == nullptr) {
|
||||
LOGE("Can not cast Context to QJSDelcarativeEngineInstance object.");
|
||||
LOGE("Can not cast Context to QJSDeclarativeEngineInstance object.");
|
||||
return JS_NULL;
|
||||
}
|
||||
std::string paramsStr = instance->GetDelegate()->GetParams();
|
||||
@@ -207,7 +207,7 @@ JSValue PostponePageTransition(JSContext* ctx, JSValueConst value, int32_t argc,
|
||||
{
|
||||
auto* instance = static_cast<QJSDeclarativeEngineInstance*>(JS_GetContextOpaque(ctx));
|
||||
if (instance == nullptr) {
|
||||
LOGE("Can not cast Context to QJSDelcarativeEngineInstance object.");
|
||||
LOGE("Can not cast Context to QJSDeclarativeEngineInstance object.");
|
||||
return JS_NULL;
|
||||
}
|
||||
instance->GetDelegate()->PostponePageTransition();
|
||||
@@ -218,7 +218,7 @@ JSValue LaunchPageTransition(JSContext* ctx, JSValueConst value, int32_t argc, J
|
||||
{
|
||||
auto* instance = static_cast<QJSDeclarativeEngineInstance*>(JS_GetContextOpaque(ctx));
|
||||
if (instance == nullptr) {
|
||||
LOGE("Can not cast Context to QJSDelcarativeEngineInstance object.");
|
||||
LOGE("Can not cast Context to QJSDeclarativeEngineInstance object.");
|
||||
return JS_NULL;
|
||||
}
|
||||
instance->GetDelegate()->LaunchPageTransition();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021-2000 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@@ -103,8 +103,8 @@ void V8Class<C>::Method(const char* name, R (Base::*func)(Args...), int id)
|
||||
{
|
||||
v8::Isolate* isolate = V8DeclarativeEngineInstance::GetV8Isolate();
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
auto& funtionTemplate = functionTemplates_[isolate];
|
||||
funtionTemplate.Get(isolate)->PrototypeTemplate()->Set(isolate, name,
|
||||
auto& functionTemplate = functionTemplates_[isolate];
|
||||
functionTemplate.Get(isolate)->PrototypeTemplate()->Set(isolate, name,
|
||||
v8::FunctionTemplate::New(isolate, MethodCallback<Base, R, Args...>, v8::Integer::New(isolate, id)));
|
||||
}
|
||||
|
||||
@@ -114,8 +114,8 @@ void V8Class<C>::CustomMethod(const char* name, MemberFunctionCallback<T> callba
|
||||
{
|
||||
v8::Isolate* isolate = V8DeclarativeEngineInstance::GetV8Isolate();
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
auto& funtionTemplate = functionTemplates_[isolate];
|
||||
funtionTemplate.Get(isolate)->PrototypeTemplate()->Set(isolate, name,
|
||||
auto& functionTemplate = functionTemplates_[isolate];
|
||||
functionTemplate.Get(isolate)->PrototypeTemplate()->Set(isolate, name,
|
||||
v8::FunctionTemplate::New(isolate,
|
||||
InternalMemberFunctionCallback<T, const v8::FunctionCallbackInfo<v8::Value>&>,
|
||||
v8::Integer::New(isolate, id)));
|
||||
@@ -126,8 +126,8 @@ void V8Class<C>::CustomMethod(const char* name, FunctionCallback callback)
|
||||
{
|
||||
v8::Isolate* isolate = V8DeclarativeEngineInstance::GetV8Isolate();
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
auto& funtionTemplate = functionTemplates_[isolate];
|
||||
funtionTemplate.Get(isolate)->PrototypeTemplate()->Set(
|
||||
auto& functionTemplate = functionTemplates_[isolate];
|
||||
functionTemplate.Get(isolate)->PrototypeTemplate()->Set(
|
||||
isolate, name, v8::FunctionTemplate::New(isolate, callback));
|
||||
}
|
||||
|
||||
@@ -137,8 +137,8 @@ void V8Class<C>::CustomMethod(const char* name, JSMemberFunctionCallback<T> call
|
||||
{
|
||||
v8::Isolate* isolate = V8DeclarativeEngineInstance::GetV8Isolate();
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
auto& funtionTemplate = functionTemplates_[isolate];
|
||||
funtionTemplate.Get(isolate)->PrototypeTemplate()->Set(isolate, name,
|
||||
auto& functionTemplate = functionTemplates_[isolate];
|
||||
functionTemplate.Get(isolate)->PrototypeTemplate()->Set(isolate, name,
|
||||
v8::FunctionTemplate::New(
|
||||
isolate, InternalMemberFunctionCallback<T, const JSCallbackInfo&>, v8::Integer::New(isolate, id)));
|
||||
}
|
||||
@@ -150,9 +150,9 @@ void V8Class<C>::CustomProperty(const char* name, MemberFunctionGetCallback<T> c
|
||||
{
|
||||
v8::Isolate* isolate = V8DeclarativeEngineInstance::GetV8Isolate();
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
auto& funtionTemplate = functionTemplates_[isolate];
|
||||
auto& functionTemplate = functionTemplates_[isolate];
|
||||
|
||||
funtionTemplate.Get(isolate)->PrototypeTemplate()->SetAccessorProperty(
|
||||
functionTemplate.Get(isolate)->PrototypeTemplate()->SetAccessorProperty(
|
||||
v8::Local<v8::Name>::Cast(V8ValueConvertor::toV8Value<std::string>(name)),
|
||||
v8::FunctionTemplate::New(isolate,
|
||||
InternalMemberFunctionCallback<T, const v8::FunctionCallbackInfo<v8::Value>&>,
|
||||
@@ -167,8 +167,8 @@ void V8Class<C>::CustomProperty(const char* name, FunctionGetCallback getter, Fu
|
||||
{
|
||||
v8::Isolate* isolate = V8DeclarativeEngineInstance::GetV8Isolate();
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
auto& funtionTemplate = functionTemplates_[isolate];
|
||||
funtionTemplate.Get(isolate)->PrototypeTemplate()->SetAccessorProperty(
|
||||
auto& functionTemplate = functionTemplates_[isolate];
|
||||
functionTemplate.Get(isolate)->PrototypeTemplate()->SetAccessorProperty(
|
||||
v8::Local<v8::Name>::Cast(V8ValueConvertor::toV8Value<std::string>(name)),
|
||||
v8::FunctionTemplate::New(isolate, getter),
|
||||
v8::FunctionTemplate::New(isolate, setter));
|
||||
@@ -181,8 +181,8 @@ void V8Class<C>::CustomProperty(const char* name, JSMemberFunctionCallback<T> ca
|
||||
{
|
||||
v8::Isolate* isolate = V8DeclarativeEngineInstance::GetV8Isolate();
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
auto& funtionTemplate = functionTemplates_[isolate];
|
||||
funtionTemplate.Get(isolate)->PrototypeTemplate()->SetAccessorProperty(
|
||||
auto& functionTemplate = functionTemplates_[isolate];
|
||||
functionTemplate.Get(isolate)->PrototypeTemplate()->SetAccessorProperty(
|
||||
v8::Local<v8::Name>::Cast(V8ValueConvertor::toV8Value<std::string>(name)),
|
||||
v8::FunctionTemplate::New(
|
||||
isolate, InternalMemberFunctionCallback<T, const JSCallbackInfo&>, v8::Integer::New(isolate, getterId)),
|
||||
|
||||
@@ -72,5 +72,5 @@ private:
|
||||
ACE_DISALLOW_COPY_AND_MOVE(JSTextInputController);
|
||||
};
|
||||
|
||||
} // namespace OHOS::Ace::Fremawork
|
||||
} // namespace OHOS::Ace::Framework
|
||||
#endif // FRAMEWORKS_BRIDGE_DECLARATIVE_FRONTEND_JS_VIEW_JS_TEXTINPUT_H
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2021-2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@@ -113,7 +113,7 @@ void HdcJdwpSimulator::ConnectJdwp(uv_connect_t *connection, int status)
|
||||
LOGE("ConnectJdwp new info fail.");
|
||||
return;
|
||||
}
|
||||
if (memset_s(info, pkgSize, 0, pkgSize) != 0) {
|
||||
if (memset_s(info, pkgSize, 0, pkgSize) != EOK) {
|
||||
delete[] info;
|
||||
info = nullptr;
|
||||
return;
|
||||
@@ -124,7 +124,7 @@ void HdcJdwpSimulator::ConnectJdwp(uv_connect_t *connection, int status)
|
||||
LOGI("ConnectJdwp send pid:%{public}d, pkgName:%{public}s, msglen:%{public}d, ", jsMsg->pid, pkgName.c_str(),
|
||||
jsMsg->msgLen);
|
||||
bool retFail = false;
|
||||
if (memcpy_s(info + sizeof(JsMsgHeader), pkgName.size(), &pkgName[0], pkgName.size()) != 0) {
|
||||
if (memcpy_s(info + sizeof(JsMsgHeader), pkgName.size(), &pkgName[0], pkgName.size()) != EOK) {
|
||||
LOGE("ConnectJdwp memcpy_s fail :%{public}s.", pkgName.c_str());
|
||||
retFail = true;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@@ -284,8 +284,8 @@ void FlutterRenderCustomPaint::TransferFromImageBitmap(const RefPtr<OffscreenCan
|
||||
{
|
||||
std::unique_ptr<ImageData> imageData = offscreenCanvas->GetImageData(0, 0,
|
||||
offscreenCanvas->GetWidth(), offscreenCanvas->GetHeight());
|
||||
ImageData* imageDataPtr = imageData.get();
|
||||
if (imageData != nullptr) {
|
||||
ImageData* imageDataPtr = imageData.get();
|
||||
PutImageData(Offset(0, 0), *imageDataPtr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@@ -74,7 +74,7 @@ std::string GetMimeType(const std::string& args)
|
||||
}
|
||||
|
||||
// Quality need between 0.0 and 1.0 for MimeType jpeg and webp
|
||||
double GetQuality(const std::string args, const double quality)
|
||||
double GetQuality(const std::string& args, const double quality)
|
||||
{
|
||||
std::string type = args;
|
||||
auto mimeType = GetMimeType(type);
|
||||
|
||||
@@ -1554,11 +1554,11 @@ void RosenRenderCustomPaint::Mesh(SkBitmap& bitmap, int column, int row,
|
||||
flags |= SkVertices::kHasColors_BuilderFlag;
|
||||
}
|
||||
SkVertices::Builder builder(SkVertices::kTriangles_VertexMode, vertCounts, indexCount, flags);
|
||||
if (memcpy_s(builder.positions(), vertCounts * sizeof(SkPoint), vertices, vertCounts * sizeof(SkPoint)) != 0) {
|
||||
if (memcpy_s(builder.positions(), vertCounts * sizeof(SkPoint), vertices, vertCounts * sizeof(SkPoint)) != EOK) {
|
||||
return;
|
||||
}
|
||||
if (colors) {
|
||||
if (memcpy_s(builder.colors(), vertCounts * sizeof(SkColor), colors, vertCounts * sizeof(SkColor)) != 0) {
|
||||
if (memcpy_s(builder.colors(), vertCounts * sizeof(SkColor), colors, vertCounts * sizeof(SkColor)) != EOK) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ std::string GetMimeType(const std::string& args)
|
||||
}
|
||||
|
||||
// Quality need between 0.0 and 1.0 for MimeType jpeg and webp
|
||||
double GetQuality(const std::string args, const double quality)
|
||||
double GetQuality(const std::string& args, const double quality)
|
||||
{
|
||||
std::string type = args;
|
||||
auto mimeType = GetMimeType(type);
|
||||
|
||||
@@ -209,8 +209,9 @@ void ConvertTxtStyle(const TextStyle& textStyle, const WeakPtr<PipelineContext>&
|
||||
txtStyle.word_spacing = textStyle.GetWordSpacing().Value();
|
||||
}
|
||||
}
|
||||
|
||||
txtStyle.letter_spacing = pipelineContext->NormalizeToPx(textStyle.GetLetterSpacing());
|
||||
if (pipelineContext) {
|
||||
txtStyle.letter_spacing = pipelineContext->NormalizeToPx(textStyle.GetLetterSpacing());
|
||||
}
|
||||
txtStyle.text_baseline = ConvertTxtTextBaseline(textStyle.GetTextBaseline());
|
||||
txtStyle.decoration = ConvertTxtTextDecoration(textStyle.GetTextDecoration());
|
||||
txtStyle.decoration_color = ConvertSkColor(textStyle.GetTextDecorationColor());
|
||||
|
||||
@@ -83,22 +83,22 @@ void SubContainer::Destroy()
|
||||
void SubContainer::UpdateRootElmentSize()
|
||||
{
|
||||
auto formComponet = AceType::DynamicCast<FormComponent>(formComponent_);
|
||||
Dimension rootWidht = 0.0_vp;
|
||||
Dimension rootWidth = 0.0_vp;
|
||||
Dimension rootHeight = 0.0_vp;
|
||||
if (formComponet) {
|
||||
rootWidht = formComponet->GetWidth();
|
||||
rootWidth = formComponet->GetWidth();
|
||||
rootHeight = formComponet->GetHeight();
|
||||
}
|
||||
|
||||
if (rootWidht_ == rootWidht && rootHeight == rootHeight) {
|
||||
if (rootWidht_ == rootWidth && rootHeight_ == rootHeight) {
|
||||
LOGE("size not changed, should not change");
|
||||
return;
|
||||
}
|
||||
|
||||
surfaceWidth_ = outSidePipelineContext_.Upgrade()->NormalizeToPx(rootWidht);
|
||||
surfaceWidth_ = outSidePipelineContext_.Upgrade()->NormalizeToPx(rootWidth);
|
||||
surfaceHeight_ = outSidePipelineContext_.Upgrade()->NormalizeToPx(rootHeight);
|
||||
if (pipelineContext_) {
|
||||
pipelineContext_->SetRootSize(density_, rootWidht.Value(), rootHeight.Value());
|
||||
pipelineContext_->SetRootSize(density_, rootWidth.Value(), rootHeight.Value());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@@ -39,7 +39,7 @@ struct SvgRadius {
|
||||
|
||||
bool IsValid() const
|
||||
{
|
||||
return topLeft.IsValid() || topLeft.IsValid() || topLeft.IsValid() || topLeft.IsValid();
|
||||
return topLeft.IsValid() || topRight.IsValid() || bottomLeft.IsValid() || bottomRight.IsValid();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@@ -53,7 +53,7 @@ void RenderTransform::Translate(const Dimension& x, const Dimension& y)
|
||||
|
||||
void RenderTransform::Scale(float value)
|
||||
{
|
||||
LOGD("TransformMock Scale. scale: %{public}f, this:%p", value, this);
|
||||
LOGD("TransformMock Scale. scale: %{public}f", value);
|
||||
auto mock = AceType::DynamicCast<MockRenderTransform>(this);
|
||||
if (mock) {
|
||||
mock->MockScale(value);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@@ -857,8 +857,6 @@ protected:
|
||||
* @tc.name: PushPageTest001
|
||||
* @tc.desc: test scale animation in tween.
|
||||
* @tc.type: FUNC
|
||||
* @tc.require: AR000DAIGV
|
||||
* @tc.author: zhouzebin
|
||||
*/
|
||||
HWTEST_F(TransitionElementTest, PushPageTest001, TestSize.Level1)
|
||||
{
|
||||
@@ -897,10 +895,6 @@ HWTEST_F(TransitionElementTest, PushPageTest001, TestSize.Level1)
|
||||
GetTransitionGroupFromTransition(transitionB_);
|
||||
GetTransitionGroupFromTransition(transitionA_);
|
||||
EXPECT_NE(transitionA_.pageTransitionElement_, transitionB_.pageTransitionElement_);
|
||||
LOGD("transition in: content display render %{public}p, transform render %{public}p",
|
||||
&(*transitionB_.displayRenderContent_.Upgrade()), &(*transitionB_.transformRenderContent_.Upgrade()));
|
||||
LOGD("transition out: content display render %{public}p, transform render %{public}p",
|
||||
&(*transitionA_.displayRenderContent_.Upgrade()), &(*transitionA_.transformRenderContent_.Upgrade()));
|
||||
EXPECT_TRUE(transitionB_.displayRenderContent_.Upgrade()->GetHidden());
|
||||
EXPECT_EQ(VisibleType::VISIBLE, transitionA_.displayRenderContent_.Upgrade()->GetVisibleType());
|
||||
|
||||
@@ -923,8 +917,6 @@ HWTEST_F(TransitionElementTest, PushPageTest001, TestSize.Level1)
|
||||
* @tc.name: PushPageTest002
|
||||
* @tc.desc: test translate animation in tween.
|
||||
* @tc.type: FUNC
|
||||
* @tc.require: AR000DQ1VJ
|
||||
* @tc.author: jiangdayuan
|
||||
*/
|
||||
HWTEST_F(TransitionElementTest, PushPageTest002, TestSize.Level1)
|
||||
{
|
||||
@@ -961,8 +953,6 @@ HWTEST_F(TransitionElementTest, PushPageTest002, TestSize.Level1)
|
||||
* @tc.name: TransitionUIStandardTest001
|
||||
* @tc.desc: test ui standard for transition
|
||||
* @tc.type: FUNC
|
||||
* @tc.require: AR000DBTLT
|
||||
* @tc.author: zhouzebin
|
||||
*/
|
||||
HWTEST_F(TransitionElementTest, TransitionUIStandardTest001, TestSize.Level1)
|
||||
{
|
||||
@@ -1017,8 +1007,6 @@ HWTEST_F(TransitionElementTest, TransitionUIStandardTest001, TestSize.Level1)
|
||||
* @tc.name: TransitionUIStandardTest002
|
||||
* @tc.desc: test phone push transition
|
||||
* @tc.type: FUNC
|
||||
* @tc.require: AR000DQ1VF
|
||||
* @tc.author: zhouzebin
|
||||
*/
|
||||
HWTEST_F(TransitionElementTest, TransitionUIStandardTest002, TestSize.Level1)
|
||||
{
|
||||
@@ -1070,8 +1058,6 @@ HWTEST_F(TransitionElementTest, TransitionUIStandardTest002, TestSize.Level1)
|
||||
* @tc.name: TransitionUIStandardTest003
|
||||
* @tc.desc: test watch push transition
|
||||
* @tc.type: FUNC
|
||||
* @tc.require: AR000DQ1VG
|
||||
* @tc.author: jiangdayuan
|
||||
*/
|
||||
HWTEST_F(TransitionElementTest, TransitionUIStandardTest003, TestSize.Level1)
|
||||
{
|
||||
@@ -1123,8 +1109,6 @@ HWTEST_F(TransitionElementTest, TransitionUIStandardTest003, TestSize.Level1)
|
||||
* @tc.name: TransitionUIStandardTest004
|
||||
* @tc.desc: test watch pop transition
|
||||
* @tc.type: FUNC
|
||||
* @tc.require: AR000DR6DE
|
||||
* @tc.author: jiangdayuan
|
||||
*/
|
||||
HWTEST_F(TransitionElementTest, TransitionUIStandardTest004, TestSize.Level1)
|
||||
{
|
||||
@@ -1148,8 +1132,6 @@ HWTEST_F(TransitionElementTest, TransitionUIStandardTest004, TestSize.Level1)
|
||||
* @tc.name: TransitionUIStandardTest005
|
||||
* @tc.desc: test phone pop transition
|
||||
* @tc.type: FUNC
|
||||
* @tc.require: AR000DQ1VE
|
||||
* @tc.author: jiangdayuan
|
||||
*/
|
||||
HWTEST_F(TransitionElementTest, TransitionUIStandardTest005, TestSize.Level1)
|
||||
{
|
||||
@@ -1174,8 +1156,6 @@ HWTEST_F(TransitionElementTest, TransitionUIStandardTest005, TestSize.Level1)
|
||||
* @tc.name: OneShotTransitionTest001
|
||||
* @tc.desc: test tv push transition with shared element with custom page transition parameters.
|
||||
* @tc.type: FUNC
|
||||
* @tc.require: AR000DR6TF
|
||||
* @tc.author: zhouzebin
|
||||
*/
|
||||
HWTEST_F(TransitionElementTest, OneShotTransitionTest001, TestSize.Level1)
|
||||
{
|
||||
@@ -1221,8 +1201,6 @@ HWTEST_F(TransitionElementTest, OneShotTransitionTest001, TestSize.Level1)
|
||||
* @tc.name: OneShotTransitionTest002
|
||||
* @tc.desc: test phone pop transition with shared element with default page transition parameters.
|
||||
* @tc.type: FUNC
|
||||
* @tc.require: AR000DQ2TV
|
||||
* @tc.author: zhouzebin
|
||||
*/
|
||||
HWTEST_F(TransitionElementTest, OneShotTransitionTest002, TestSize.Level1)
|
||||
{
|
||||
@@ -1250,8 +1228,6 @@ HWTEST_F(TransitionElementTest, OneShotTransitionTest002, TestSize.Level1)
|
||||
* @tc.name: OneShotTransitionTest003
|
||||
* @tc.desc: test watch pop transition with shared element with default page transition parameters.
|
||||
* @tc.type: FUNC
|
||||
* @tc.require: AR000DQ203
|
||||
* @tc.author: zhouzebin
|
||||
*/
|
||||
HWTEST_F(TransitionElementTest, OneShotTransitionTest003, TestSize.Level1)
|
||||
{
|
||||
@@ -1279,8 +1255,6 @@ HWTEST_F(TransitionElementTest, OneShotTransitionTest003, TestSize.Level1)
|
||||
* @tc.name: PushPageCardTransitionTest001
|
||||
* @tc.desc: test card container size and offset animation in card push transition.
|
||||
* @tc.type: FUNC
|
||||
* @tc.require: AR000F3C9H
|
||||
* @tc.author: chenlien
|
||||
*/
|
||||
HWTEST_F(TransitionElementTest, PushPageCardTransitionTest001, TestSize.Level1)
|
||||
{
|
||||
@@ -1321,8 +1295,6 @@ HWTEST_F(TransitionElementTest, PushPageCardTransitionTest001, TestSize.Level1)
|
||||
* @tc.name: PushPageCardTransitionTest002
|
||||
* @tc.desc: test Opacity animation in card push transition.
|
||||
* @tc.type: FUNC
|
||||
* @tc.require: AR000F3C9H
|
||||
* @tc.author: chenlien
|
||||
*/
|
||||
HWTEST_F(TransitionElementTest, PushPageCardTransitionTest002, TestSize.Level1)
|
||||
{
|
||||
@@ -1363,8 +1335,6 @@ HWTEST_F(TransitionElementTest, PushPageCardTransitionTest002, TestSize.Level1)
|
||||
* @tc.name: PopPageCardTransitionTest001
|
||||
* @tc.desc: test clip size and offset animation in card pop transition.
|
||||
* @tc.type: FUNC
|
||||
* @tc.require: AR000F3CA6
|
||||
* @tc.author: chenlien
|
||||
*/
|
||||
HWTEST_F(TransitionElementTest, PopPageCardTransitionTest001, TestSize.Level1)
|
||||
{
|
||||
@@ -1398,8 +1368,6 @@ HWTEST_F(TransitionElementTest, PopPageCardTransitionTest001, TestSize.Level1)
|
||||
* @tc.name: PopPageCardTransitionTest002
|
||||
* @tc.desc: test opacity animation in card pop transition.
|
||||
* @tc.type: FUNC
|
||||
* @tc.require: AR000F3CA6
|
||||
* @tc.author: chenlien
|
||||
*/
|
||||
HWTEST_F(TransitionElementTest, PopPageCardTransitionTest002, TestSize.Level1)
|
||||
{
|
||||
|
||||
@@ -869,22 +869,22 @@ std::unique_ptr<JsonValue> InspectorComposedElement::GetBackgroundImagePosition(
|
||||
std::unique_ptr<JsonValue> InspectorComposedElement::GetAlignmentType(double width, double height) const
|
||||
{
|
||||
auto jsonValue = JsonUtil::Create(false);
|
||||
if (width == 0) {
|
||||
if (height == 0) {
|
||||
if (NearZero(width)) {
|
||||
if (NearZero(height)) {
|
||||
jsonValue->Put("x", "Alignment.TopStart");
|
||||
return jsonValue->GetValue("x");
|
||||
} else if (height == 50) {
|
||||
} else if (NearEqual(height, 50.0)) { // Determine whether the vertical element is centered
|
||||
jsonValue->Put("x", "Alignment.Start");
|
||||
return jsonValue->GetValue("x");
|
||||
} else {
|
||||
jsonValue->Put("x", "Alignment.BottomStart");
|
||||
return jsonValue->GetValue("x");
|
||||
}
|
||||
} else if (width == 50) {
|
||||
if (height == 0) {
|
||||
} else if (NearEqual(width, 50.0)) { // Judge whether the horizontal element is centered
|
||||
if (NearZero(height)) {
|
||||
jsonValue->Put("x", "Alignment.Top");
|
||||
return jsonValue->GetValue("x");
|
||||
} else if (height == 50) {
|
||||
} else if (NearEqual(height, 50)) {
|
||||
jsonValue->Put("x", "Alignment.Center");
|
||||
return jsonValue->GetValue("x");
|
||||
} else {
|
||||
@@ -892,10 +892,10 @@ std::unique_ptr<JsonValue> InspectorComposedElement::GetAlignmentType(double wid
|
||||
return jsonValue->GetValue("x");
|
||||
}
|
||||
} else {
|
||||
if (height == 0) {
|
||||
if (NearZero(height)) {
|
||||
jsonValue->Put("x", "Alignment.TopEnd");
|
||||
return jsonValue->GetValue("x");
|
||||
} else if (height == 50) {
|
||||
} else if (NearEqual(height, 50.0)) {
|
||||
jsonValue->Put("x", "Alignment.End");
|
||||
return jsonValue->GetValue("x");
|
||||
} else {
|
||||
|
||||
@@ -256,7 +256,6 @@ void ImageProvider::UploadImageToGPUForRender(
|
||||
// If want to dump draw command or gpu disabled, should use CPU image.
|
||||
callback({ image, renderTaskHolder->unrefQueue });
|
||||
#else
|
||||
|
||||
auto rasterizedImage = image->makeRasterImage();
|
||||
if (!rasterizedImage) {
|
||||
LOGW("Rasterize image failed. callback.");
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ACE_ANDROID_SRC_FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_BASE_MEASURABLE_H
|
||||
#define ACE_ANDROID_SRC_FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_BASE_MEASURABLE_H
|
||||
#ifndef FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_BASE_MEASURABLE_H
|
||||
#define FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_BASE_MEASURABLE_H
|
||||
|
||||
#include "base/memory/ace_type.h"
|
||||
#include "frameworks/base/geometry/animatable_dimension.h"
|
||||
@@ -92,4 +92,4 @@ protected:
|
||||
|
||||
} // namespace OHOS::Ace
|
||||
|
||||
#endif // ACE_ANDROID_SRC_FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_BASE_MEASURABLE_H
|
||||
#endif // FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_BASE_MEASURABLE_H
|
||||
@@ -233,7 +233,9 @@ std::string AceUnwrapStringFromJS(napi_env env, napi_value param, const std::str
|
||||
if (buf == nullptr) {
|
||||
return value;
|
||||
}
|
||||
memset_s(buf, size + 1, 0, size + 1);
|
||||
if (memset_s(buf, size + 1, 0, size + 1) != EOK) {
|
||||
return value;
|
||||
}
|
||||
|
||||
bool rev = napi_get_value_string_utf8(env, param, buf, size + 1, &size) == napi_ok;
|
||||
if (rev) {
|
||||
@@ -263,7 +265,9 @@ bool AceUnwrapStringFromJS2(napi_env env, napi_value param, std::string& value)
|
||||
if (buf == nullptr) {
|
||||
return false;
|
||||
}
|
||||
memset_s(buf, (size + 1), 0, (size + 1));
|
||||
if (memset_s(buf, (size + 1), 0, (size + 1)) != EOK) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool rev = napi_get_value_string_utf8(env, param, buf, size + 1, &size) == napi_ok;
|
||||
if (rev) {
|
||||
|
||||
Reference in New Issue
Block a user