support GENERIC type

add GENERIC type for napi

https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I9NU49

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I0aea5982cc90ac14b4b1d21ca9435d9672c00d99
This commit is contained in:
wengchangcheng 2024-05-09 14:36:34 +08:00 committed by liu-zelin
parent 76cbb82b9d
commit 23a08c7a8a
2 changed files with 3 additions and 0 deletions

View File

@ -111,6 +111,8 @@ SharedFieldType JSNapiSendable::GetSharedFieldType(JSThread *thread,
switch (type) {
case FunctionRef::SendableType::OBJECT:
return SharedFieldType::SENDABLE;
case FunctionRef::SendableType::GENERIC:
return SharedFieldType::GENERIC;
case FunctionRef::SendableType::NONE: {
auto valueHandle = JSNApiHelper::ToJSHandle(value);
if (valueHandle->IsUndefined()) {

View File

@ -646,6 +646,7 @@ public:
enum class SendableType {
NONE,
OBJECT,
GENERIC,
};
struct SendablePropertiesInfo {
std::vector<Local<JSValueRef>> keys;