Lines Matching defs:thread
195 JSHandle<JSTaggedValue> obj(JSTaggedValue::ToObject(thread, JSNApiHelper::ToJSHandle(this)));
197 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
208 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
222 obj = JSHandle<JSTaggedValue>(JSTaggedValue::ToString(thread, obj));
223 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
257 JSTaggedNumber number = JSTaggedValue::ToInteger(thread, tagged);
258 RETURN_VALUE_IF_ABRUPT(thread, 0);
269 number = JSTaggedValue::ToUint32(thread, tagged);
272 number = JSTaggedValue::ToUint32(thread, tagged);
274 RETURN_VALUE_IF_ABRUPT(thread, 0);
285 number = JSTaggedValue::ToInt32(thread, tagged);
288 number = JSTaggedValue::ToInt32(thread, tagged);
290 RETURN_VALUE_IF_ABRUPT(thread, 0);
370 JSHandle<JSTaggedValue> booleanObj(thread, JSTaggedValue(obj->ToBoolean()));
380 JSHandle<JSTaggedValue> bigIntObj(thread, JSTaggedValue::ToBigInt(thread, obj));
381 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
391 JSHandle<JSTaggedValue> number(thread, JSTaggedValue::ToNumber(thread, obj));
392 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
403 return JSTaggedValue::StrictEqual(thread, xValue, yValue);
410 JSTaggedValue value = FastRuntimeStub::FastTypeOf(thread, JSNApiHelper::ToJSTaggedValue(this));
411 return JSNApiHelper::ToLocal<StringRef>(JSHandle<JSTaggedValue>(thread, value));
421 return JSObject::InstanceOf(thread, origin, target);
499 return JSNApiHelper::ToJSTaggedValue(this).IsArray(thread);
1134 JSThread* thread = vm->GetJSThread();
1135 JSHandle<JSArrayBuffer> retArrayBuffer(thread, dataView->GetViewedArrayBuffer());
1177 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
1201 JSHandle<JSTaggedValue> arrayBuffer(thread, dataView->GetViewedArrayBuffer());
1215 JSHandle<JSTaggedValue> value(thread, primitiveValue);
1230 JSHandle<JSTaggedValue> number(thread, JSTaggedValue(input), true);
1239 JSHandle<JSTaggedValue> number(thread, JSTaggedValue(input), true);
1248 JSHandle<JSTaggedValue> number(thread, JSTaggedValue(input), true);
1257 JSHandle<JSTaggedValue> number(thread, JSTaggedValue(input), true);
1274 return JSNApiHelper::ToLocal<JSValueRef>(JSHandle<JSTaggedValue>(thread,
1275 map->Get(thread, JSNApiHelper::ToJSTaggedValue(*key))));
1285 auto result = JSHandle<JSTaggedValue>(thread, map->Get(thread, key.GetTaggedValue()));
1294 JSMap::Set(thread, map, JSNApiHelper::ToJSHandle(key), JSNApiHelper::ToJSHandle(value));
1304 JSMap::Set(thread, map, key, JSNApiHelper::ToJSHandle(value));
1312 bool result = map->Has(thread, JSNApiHelper::ToJSTaggedValue(*key));
1323 bool result = map->Has(thread, key.GetTaggedValue());
1332 JSMap::Delete(thread, map, JSNApiHelper::ToJSHandle(key));
1340 JSMap::Clear(thread, map);
1347 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
1348 JSHandle<GlobalEnv> env = thread->GetEcmaVM()->GetGlobalEnv();
1352 JSHandle<LinkedHashMap> hashMap = LinkedHashMap::Create(thread);
1353 map->SetLinkedMap(thread, hashMap);
1381 return JSNApiHelper::ToLocal<JSValueRef>(JSHandle<JSTaggedValue>(thread, map->GetKey(entry)));
1390 return JSNApiHelper::ToLocal<JSValueRef>(JSHandle<JSTaggedValue>(thread, map->GetValue(entry)));
1400 ecmascript::JSMapIterator::CreateMapIterator(thread, map, IterationKind::KEY_AND_VALUE);
1410 JSHandle<JSTaggedValue> mapIter = ecmascript::JSMapIterator::CreateMapIterator(thread, map, IterationKind::KEY);
1420 JSHandle<JSTaggedValue> mapIter = ecmascript::JSMapIterator::CreateMapIterator(thread, map, IterationKind::VALUE);
1428 ecmascript::ThreadManagedScope managedScope(thread);
1437 LinkedHashMap::Create(thread, LinkedHashMap::MIN_CAPACITY, ecmascript::MemSpaceKind::SHARED);
1438 sharedMap->SetLinkedMap(thread, linkedMap);
1446 ecmascript::ThreadManagedScope managedScope(thread);
1448 return JSNApiHelper::ToLocal<JSValueRef>(JSHandle<JSTaggedValue>(thread,
1449 ecmascript::JSSharedMap::Get(thread, map, JSNApiHelper::ToJSTaggedValue(*key))));
1455 ecmascript::ThreadManagedScope managedScope(thread);
1459 auto result = JSHandle<JSTaggedValue>(thread, ecmascript::JSSharedMap::Get(thread, map, key.GetTaggedValue()));
1466 ecmascript::ThreadManagedScope managedScope(thread);
1468 ecmascript::JSSharedMap::Set(thread, map, JSNApiHelper::ToJSHandle(key), JSNApiHelper::ToJSHandle(value));
1474 ecmascript::ThreadManagedScope managedScope(thread);
1478 ecmascript::JSSharedMap::Set(thread, map, key, JSNApiHelper::ToJSHandle(value));
1484 ecmascript::ThreadManagedScope managedScope(thread);
1486 bool result = ecmascript::JSSharedMap::Has(thread, map, JSNApiHelper::ToJSTaggedValue(*key));
1493 ecmascript::ThreadManagedScope managedScope(thread);
1497 bool result = ecmascript::JSSharedMap::Has(thread, map, key.GetTaggedValue());
1504 ecmascript::ThreadManagedScope managedScope(thread);
1506 ecmascript::JSSharedMap::Delete(thread, map, JSNApiHelper::ToJSHandle(key));
1512 ecmascript::ThreadManagedScope managedScope(thread);
1514 ecmascript::JSSharedMap::Clear(thread, map);
1523 return ecmascript::JSSharedMap::GetSize(thread, map);
1532 return static_cast<int>(ecmascript::JSSharedMap::GetSize(thread, map)) +
1542 return JSNApiHelper::ToLocal<JSValueRef>(JSHandle<JSTaggedValue>(thread,
1543 ecmascript::JSSharedMap::GetKey(thread, map, entry)));
1552 return JSNApiHelper::ToLocal<JSValueRef>(JSHandle<JSTaggedValue>(thread,
1553 ecmascript::JSSharedMap::GetValue(thread, map, entry)));
1563 ecmascript::JSSharedMapIterator::CreateMapIterator(thread, map, IterationKind::KEY_AND_VALUE);
1574 ecmascript::JSSharedMapIterator::CreateMapIterator(thread, map, IterationKind::KEY);
1585 ecmascript::JSSharedMapIterator::CreateMapIterator(thread, map, IterationKind::VALUE);
1593 ecmascript::ThreadManagedScope managedScope(thread);
1602 LinkedHashSet::Create(thread, LinkedHashSet::MIN_CAPACITY, ecmascript::MemSpaceKind::SHARED);
1603 set->SetLinkedSet(thread, linkedSet);
1614 return ecmascript::JSSharedSet::GetSize(thread, set);
1623 return static_cast<int>(ecmascript::JSSharedSet::GetSize(thread, set)) +
1634 JSHandle<JSTaggedValue>(thread, ecmascript::JSSharedSet::GetValue(thread, set, entry)));
1640 ecmascript::ThreadManagedScope managedScope(thread);
1643 ecmascript::JSSharedSet::Add(thread, set, JSNApiHelper::ToJSHandle(value));
1662 const GlobalEnvConstants *globalConst = thread->GlobalConstants();
1682 ecmascript::ThreadManagedScope managedScope(thread);
1687 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
1707 ecmascript::ThreadManagedScope managedScope(thread);
1709 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
1718 ecmascript::ThreadManagedScope managedScope(thread);
1720 auto result = JSMapIterator::NextInternal(thread, mapIter);
1721 return JSNApiHelper::ToLocal<JSValueRef>(JSHandle<JSTaggedValue>(thread, result));
1728 ecmascript::ThreadManagedScope managedScope(thread);
1730 auto result = ecmascript::JSSharedMapIterator::NextInternal(thread, sharedMapIter);
1731 return JSNApiHelper::ToLocal<JSValueRef>(JSHandle<JSTaggedValue>(thread, result));
1750 const GlobalEnvConstants *globalConst = thread->GlobalConstants();
1775 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
1797 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
1817 bool result = JSTaggedValue::SetProperty(thread, obj, keyValue, currentTaggedValue);
1818 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
1840 bool result = JSTaggedValue::SetProperty(thread, obj, keyValue, currentTaggedValue);
1841 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
1870 JSThread *thread = ecmaRuntimeCallInfo->GetThread();
1871 ecmascript::ThreadManagedScope managedScope(thread);
1872 [[maybe_unused]] LocalScope scope(thread->GetEcmaVM());
1873 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
1898 JSHandle<EcmaString> StringHandle = JSTaggedValue::ToString(thread, rString);
1899 RETURN_VALUE_IF_ABRUPT(thread, JSTaggedValue::Undefined());
1910 JSHandle<JSTaggedValue> capability(JSPromise::NewPromiseCapability(thread, constructor));
1911 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
1918 ecmascript::ThreadManagedScope managedScope(thread);
1921 return JSNApiHelper::ToLocal<PromiseRef>(JSHandle<JSTaggedValue>(thread, capacity->GetPromise()));
1928 const GlobalEnvConstants *constants = thread->GlobalConstants();
1932 thread->CheckJSTaggedType(arg.GetRawData());
1939 ecmascript::EcmaInterpreter::NewRuntimeCallInfo(thread, resolve, undefined, undefined, 1);
1940 RETURN_VALUE_IF_ABRUPT(thread, false);
1943 RETURN_VALUE_IF_ABRUPT(thread, false);
1945 thread->GetCurrentEcmaContext()->ExecutePromisePendingJob();
1946 RETURN_VALUE_IF_ABRUPT(thread, false);
1947 thread->GetCurrentEcmaContext()->ClearKeptObjects();
1955 const GlobalEnvConstants *constants = thread->GlobalConstants();
1959 thread->CheckJSTaggedType(arg.GetTaggedValue().GetRawData());
1963 JSHandle<JSTaggedValue> resolve(thread, capacity->GetResolve());
1966 ecmascript::EcmaInterpreter::NewRuntimeCallInfo(thread, resolve, undefined, undefined, 1);
1967 RETURN_VALUE_IF_ABRUPT(thread, false);
1970 RETURN_VALUE_IF_ABRUPT(thread, false);
1972 thread->GetCurrentEcmaContext()->ExecutePromisePendingJob();
1973 RETURN_VALUE_IF_ABRUPT(thread, false);
1974 thread->GetCurrentEcmaContext()->ClearKeptObjects();
1982 const GlobalEnvConstants *constants = thread->GlobalConstants();
1986 thread->CheckJSTaggedType(arg.GetRawData());
1994 ecmascript::EcmaInterpreter::NewRuntimeCallInfo(thread, reject, undefined, undefined, 1);
1995 RETURN_VALUE_IF_ABRUPT(thread, false);
1998 RETURN_VALUE_IF_ABRUPT(thread, false);
2000 thread->GetCurrentEcmaContext()->ExecutePromisePendingJob();
2001 RETURN_VALUE_IF_ABRUPT(thread, false);
2002 thread->GetCurrentEcmaContext()->ClearKeptObjects();
2010 const GlobalEnvConstants *constants = thread->GlobalConstants();
2014 thread->CheckJSTaggedType(arg.GetTaggedValue().GetRawData());
2018 JSHandle<JSTaggedValue> reject(thread, capacity->GetReject());
2022 ecmascript::EcmaInterpreter::NewRuntimeCallInfo(thread, reject, undefined, undefined, 1);
2023 RETURN_VALUE_IF_ABRUPT(thread, false);
2026 RETURN_VALUE_IF_ABRUPT(thread, false);
2028 thread->GetCurrentEcmaContext()->ExecutePromisePendingJob();
2029 RETURN_VALUE_IF_ABRUPT(thread, false);
2030 thread->GetCurrentEcmaContext()->ClearKeptObjects();
2045 symbol->SetDescription(thread, desc);
2057 auto constants = thread->GlobalConstants();
2060 JSHandle<JSTaggedValue> descriptionHandle(thread, description);
2071 JSHandle<JSTaggedValue> boolean(thread, JSTaggedValue(value));
2203 JSHandle<JSTaggedValue> napiWapperString = thread->GlobalConstants()->GetHandledNapiWrapperString();
2219 TypedArrayHelper::FastCreateTypedArray(thread, thread->GlobalConstants()->GetHandledUint8ArrayString(),
2221 JSHandle<JSObject> arrayBuffer(thread, JSTypedArray::Cast(*obj)->GetViewedArrayBufferOrByteArray());
2263 JSHandle<BigInt> big = BigInt::Uint64ToBigInt(thread, input);
2274 JSHandle<BigInt> big = BigInt::Int64ToBigInt(thread, input);
2285 JSHandle<BigInt> big = BigInt::CreateBigWords(thread, sign, size, words);
2298 BigInt::BigIntToInt64(thread, bigintVal, value, lossless);
2309 BigInt::BigIntToUint64(thread, bigintVal, value, lossless);
2405 auto thread = vm->GetJSThread();
2407 escapeHandle_ = ToUintPtr(thread->GetCurrentEcmaContext()->GetHandleScopeStorageNext() - 1);
2416 ecmascript::ThreadManagedScope managedScope(thread);
2417 JSHandle<JSTaggedValue> integer(thread, JSTaggedValue(input));
2426 ecmascript::ThreadManagedScope managedScope(thread);
2427 JSHandle<JSTaggedValue> integer(thread, JSTaggedValue(input));
2482 JSThread *thread = vm->GetJSThread();
2486 new (reinterpret_cast<void *>(head)) PropertyDescriptor(thread,
2503 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
2514 JSNapiSendable::InitWithPropertiesInfo(thread, info, descs);
2516 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
2528 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
2551 JSHandle<AccessorData> accessor = thread->GetEcmaVM()->GetFactory()->NewAccessorData();
2552 accessor->SetGetter(thread, getterValue);
2553 accessor->SetSetter(thread, setterValue);
2562 ecmascript::ThreadManagedScope managedScope(thread);
2565 JSHandle<AccessorData> accessor = thread->GetEcmaVM()->GetFactory()->NewSAccessorData();
2566 accessor->SetGetter(thread, getterValue);
2567 accessor->SetSetter(thread, setterValue);
2582 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, false);
2597 return JSTaggedValue::SetProperty(thread, obj, keyValue, valueValue);
2599 return ObjectFastOperator::FastSetPropertyByValue(thread, obj.GetTaggedValue(),
2615 return JSTaggedValue::SetProperty(thread, obj, keyValue, JSHandle<JSTaggedValue>(thread, valueValue));
2617 JSTaggedValue res = ObjectFastOperator::TrySetPropertyByNameThroughCacheAtLocal(thread, obj.GetTaggedValue(),
2620 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, false);
2625 res = ObjectFastOperator::SetPropertyByName(thread, obj.GetTaggedValue(), keyValue.GetTaggedValue(),
2627 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, false);
2631 return JSTaggedValue::SetProperty(thread, JSHandle<JSTaggedValue>(thread, obj.GetTaggedValue()), keyValue,
2632 JSHandle<JSTaggedValue>(thread, valueValue), true);
2634 return ObjectFastOperator::FastSetPropertyByValue(thread, obj.GetTaggedValue(),
2648 return JSTaggedValue::SetProperty(thread, obj, key, valueValue);
2650 return ObjectFastOperator::FastSetPropertyByIndex(thread, obj.GetTaggedValue(),
2662 PropertyDescriptor desc(thread, attribute.IsWritable(), attribute.IsEnumerable(), attribute.IsConfigurable());
2669 return JSTaggedValue::DefineOwnProperty(thread, obj, keyValue, desc);
2683 OperationResult ret = JSTaggedValue::GetProperty(thread, obj, keyValue);
2684 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
2687 result = ObjectFastOperator::FastGetPropertyByValue(thread, obj.GetTaggedValue(),
2689 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
2692 JSHandle<JSTaggedValue> resultValue(thread, result);
2708 OperationResult ret = JSTaggedValue::GetProperty(thread, obj, keyValue);
2709 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
2712 result = ObjectFastOperator::FastGetPropertyByValue(thread, obj.GetTaggedValue(),
2714 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
2717 JSHandle<JSTaggedValue> resultValue(thread, result);
2731 OperationResult ret = JSTaggedValue::GetProperty(thread, obj, key);
2732 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
2735 result = ObjectFastOperator::FastGetPropertyByIndex(thread, obj.GetTaggedValue(), key);
2736 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
2739 JSHandle<JSTaggedValue> resultValue(thread, result);
2750 PropertyDescriptor desc(thread);
2751 bool ret = JSObject::GetOwnProperty(thread, JSHandle<JSObject>(obj), keyValue, desc);
2781 JSHandle<TaggedArray> array(JSTaggedValue::GetOwnPropertyKeys(thread, obj));
2782 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
2783 JSHandle<JSTaggedValue> jsArray(JSArray::CreateArrayFromList(thread, array));
2795 JSHandle<TaggedArray> array(JSTaggedValue::GetAllPropertyKeys(thread, obj, filter));
2796 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
2797 JSHandle<JSTaggedValue> jsArray(JSArray::CreateArrayFromList(thread, array));
2807 JSHandle<TaggedArray> array(JSObject::EnumerableOwnNames(thread, obj));
2808 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
2809 JSHandle<JSTaggedValue> jsArray(JSArray::CreateArrayFromList(thread, array));
2819 JSHandle<JSTaggedValue> prototype(thread, JSTaggedValue::GetPrototype(thread, JSHandle<JSTaggedValue>(object)));
2820 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
2830 return JSTaggedValue::SetPrototype(thread, JSHandle<JSTaggedValue>(object), JSHandle<JSTaggedValue>(proto));
2840 PropertyDescriptor desc(thread, attribute.IsWritable(), attribute.IsEnumerable(), attribute.IsConfigurable());
2842 return JSTaggedValue::DefinePropertyOrThrow(thread, object, keyValue, desc);
2852 return JSTaggedValue::HasProperty(thread, object, keyValue);
2861 return JSTaggedValue::HasProperty(thread, object, key);
2871 return JSTaggedValue::HasOwnProperty(thread, object, keyValue);
2881 return JSTaggedValue::DeleteProperty(thread, object, keyValue);
2890 JSHandle<JSTaggedValue> keyHandle(thread, JSTaggedValue(key));
2891 return JSTaggedValue::DeleteProperty(thread, object, keyHandle);
2902 bool status = JSObject::SetIntegrityLevel(thread, obj, ecmascript::IntegrityLevel::FROZEN);
2904 JSHandle<JSTaggedValue> exception(thread, JSTaggedValue::Exception());
2912 JSHandle<JSTaggedValue> exception(thread, JSTaggedValue::Exception());
2927 bool status = JSObject::SetIntegrityLevel(thread, obj, ecmascript::IntegrityLevel::SEALED);
2929 JSHandle<JSTaggedValue> exception(thread, JSTaggedValue::Exception());
2937 JSHandle<JSTaggedValue> exception(thread, JSTaggedValue::Exception());
2952 object->SetNativePointerFieldCount(thread, count);
2984 object->SetNativePointerField(thread, index, nativePointer, callBack, data, nativeBindingsize);
2996 object->SetNativePointerField(thread, index, nativePointer, callBack, data, nativeBindingsize, Concurrent::YES);
3025 ecmascript::ThreadManagedScope managedScope(thread);
3097 arrayBuffer->Detach(thread);
3142 arrayBuffer->Detach(thread);
3174 dateObject->SetTimeValue(thread, JSTaggedValue(time));
3184 JSTaggedValue dateStr = date->ToString(thread);
3186 auto constants = thread->GlobalConstants();
3189 JSHandle<JSTaggedValue> dateStrHandle(thread, dateStr);
3235 ecmascript::ThreadManagedScope managedScope(thread);
3238 JSHandle<JSTaggedValue> arrayBuffer(thread, JSTypedArray::GetOffHeapBuffer(thread, typeArray));
3272 ecmascript::ThreadManagedScope managedScope(thread);
3275 JSHandle<JSTaggedValue> arrayBuffer(thread,
3276 ecmascript::JSSharedTypedArray::GetSharedOffHeapBuffer(thread, typeArray));
3289 current->SetFunctionExtraInfo(thread, reinterpret_cast<void *>(nativeFunc), deleter, data, nativeBindingsize);
3298 ecmascript::ThreadManagedScope managedScope(thread);
3302 current->SetFunctionExtraInfo(thread, reinterpret_cast<void *>(nativeFunc), deleter,
3316 current->SetFunctionExtraInfo(thread, nullptr, deleter, data, nativeBindingsize);
3329 ecmascript::ThreadManagedScope managedScope(thread);
3333 current->SetSFunctionExtraInfo(thread, nullptr, deleter, data, nativeBindingsize);
3342 ecmascript::ThreadManagedScope managedScope(thread);
3346 current->SetFunctionExtraInfo(thread, nullptr, deleter, data, nativeBindingsize, Concurrent::YES);
3356 auto globalConst = thread->GlobalConstants();
3358 func->SetPropertyInlinedProps(thread, JSFunction::CLASS_PROTOTYPE_INLINE_PROPERTY_INDEX,
3361 func->SetPropertyInlinedProps(thread, JSFunction::LENGTH_INLINE_PROPERTY_INDEX,
3363 JSHandle<JSObject> clsPrototype = JSFunction::NewJSFunctionPrototype(thread, func);
3367 JSObject::SetPrototype(thread, JSHandle<JSObject>::Cast(func), parent);
3368 func->SetHomeObject(thread, clsPrototype);
3385 current->SetFunctionExtraInfo(thread, reinterpret_cast<void *>(nativeFunc), deleter, data, nativeBindingsize);
3403 current->SetFunctionExtraInfo(thread, nullptr, deleter, data, nativeBindingsize, Concurrent::YES);
3421 current->SetFunctionExtraInfo(thread, nullptr, deleter, data, nativeBindingsize);
3437 ecmascript::ThreadManagedScope managedScope(thread);
3442 JSNapiSendable sendable(thread, infos, name);
3443 JSHandle<JSHClass> prototypeHClass = JSHClass::CreateSPrototypeHClass(thread, sendable.GetNonStaticDescs());
3445 JSHandle<JSHClass> constructorHClass = JSHClass::CreateSConstructorHClass(thread, sendable.GetStaticDescs());
3450 JSObject::SetSProperties(thread, prototype, sendable.GetNonStaticDescs());
3451 JSObject::SetSProperties(thread, JSHandle<JSObject>::Cast(constructor), sendable.GetStaticDescs());
3455 prototypeHClass->SetPrototype(thread, JSNApiHelper::ToJSHandle(parentPrototype));
3456 constructorHClass->SetPrototype(thread, JSNApiHelper::ToJSHandle(parent));
3459 constructor->SetHomeObject(thread, prototype);
3460 constructor->SetProtoOrHClass(thread, prototype);
3461 constructor->SetLexicalEnv(thread, constructor);
3463 constructor->SetSFunctionExtraInfo(thread, nullptr, deleter, data, nativeBindingSize);
3470 JSHandle<JSHClass> iHClass = JSHClass::CreateSHClass(thread, sendable.GetInstanceDescs(), parentIHClass);
3471 iHClass->SetPrototype(thread, JSHandle<JSTaggedValue>(prototype));
3473 constructor->SetProtoOrHClass(thread, iHClass);
3495 JSHandle<JSTaggedValue> undefined = thread->GlobalConstants()->GetHandledUndefined();
3497 ecmascript::EcmaInterpreter::NewRuntimeCallInfo(thread, func, thisValue, undefined, length);
3498 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
3502 thread->CheckJSTaggedType(arg.GetTaggedValue().GetRawData());
3508 thread->CheckJSTaggedType(result.GetRawData());
3510 if (thread->HasPendingException()) {
3511 ecmascript::JsStackInfo::BuildCrashInfo(thread);
3513 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
3514 JSHandle<JSTaggedValue> resultValue(thread, result);
3516 thread->GetCurrentEcmaContext()->ClearKeptObjects();
3526 ecmascript::ThreadManagedScope managedScope(thread);
3538 JSTaggedValue undefined = thread->GlobalConstants()->GetUndefined();
3544 ecmascript::EcmaInterpreter::NewRuntimeCallInfo(thread, func, thisValue, undefined, length);
3545 RETURN_VALUE_IF_ABRUPT(thread, *JSValueRef::Hole(vm));
3549 thread->CheckJSTaggedType(JSNApiHelper::ToJSTaggedValue(argv[i]).GetRawData());
3555 if (LIKELY(thread->IsAsmInterpreter())) {
3556 STACK_LIMIT_CHECK(thread, reinterpret_cast<JSValueRef *>(*JSValueRef::Hole(vm)));
3559 RETURN_STACK_BEFORE_THROW_IF_ASM(thread);
3560 THROW_TYPE_ERROR_AND_RETURN(thread, "class constructor cannot call",
3568 thread->CheckJSTaggedType(result.GetRawData());
3570 RETURN_VALUE_IF_ABRUPT(thread, *JSValueRef::Hole(vm));
3571 if (thread->GetCurrentEcmaContext()->HasKeptObjects()) {
3572 thread->GetCurrentEcmaContext()->ClearKeptObjects();
3578 JSHandle<JSTaggedValue> resultValue(thread, result);
3595 JSHandle<JSTaggedValue> undefined = thread->GlobalConstants()->GetHandledUndefined();
3597 ecmascript::EcmaInterpreter::NewRuntimeCallInfo(thread, func, undefined, newTarget, length);
3598 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
3602 thread->CheckJSTaggedType(arg.GetTaggedValue().GetRawData());
3608 thread->CheckJSTaggedType(result.GetRawData());
3610 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
3611 JSHandle<JSTaggedValue> resultValue(thread, result);
3628 JSTaggedValue undefined = thread->GlobalConstants()->GetUndefined();
3630 ecmascript::EcmaInterpreter::NewRuntimeCallInfo(thread, func, undefined, newTarget, length);
3631 RETURN_VALUE_IF_ABRUPT(thread, *JSValueRef::Undefined(vm));
3636 thread->CheckJSTaggedType(arg.GetRawData());
3641 RETURN_VALUE_IF_ABRUPT(thread, *JSValueRef::Undefined(vm));
3644 thread->CheckJSTaggedType(result.GetRawData());
3646 JSHandle<JSTaggedValue> resultValue(thread, result);
3656 JSHandle<JSTaggedValue> prototype(thread, JSHandle<JSFunction>(func)->GetFunctionPrototype());
3670 bool res = JSObject::SetPrototype(thread, thisHandle, parentValue);
3675 JSHandle<JSTaggedValue> parentProtoType(thread, JSFunction::PrototypeGetter(thread, parentHandle));
3676 JSHandle<JSTaggedValue> thisProtoType(thread, JSFunction::PrototypeGetter(thread, thisHandle));
3677 return JSObject::SetPrototype(thread, JSHandle<JSObject>::Cast(thisProtoType), parentProtoType);
3687 JSFunction::SetFunctionNameNoPrefix(thread, func, key);
3695 JSHandle<JSFunctionBase> func(thread, JSNApiHelper::ToJSTaggedValue(this));
3696 JSHandle<JSTaggedValue> name = JSFunctionBase::GetFunctionName(thread, func);
3697 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
3706 JSHandle<JSFunctionBase> func(thread, JSNApiHelper::ToJSTaggedValue(this));
3707 JSHandle<Method> method(thread, func->GetMethod());
3719 JSMutableHandle<JSTaggedValue> sourceCodeHandle(thread, BuiltinsBase::GetTaggedString(thread, ""));
3734 sourceCodeHandle.Update(BuiltinsBase::GetTaggedString(thread, sourceCode.c_str()));
3742 JSHandle<JSFunctionBase> func(thread, JSNApiHelper::ToJSTaggedValue(this));
3743 JSHandle<Method> method(thread, func->GetMethod());
3754 function->SetSFunctionExtraInfo(thread, nullptr, deleter, data, 0);
3756 function->SetFunctionExtraInfo(thread, nullptr, deleter, data, 0);
3780 JSHandle<JSTaggedValue> array = JSArray::ArrayCreate(thread, arrayLen);
3781 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
3796 JSHandle<JSTaggedValue> result = JSArray::FastGetPropertyByValue(thread, object, index);
3806 return JSArray::FastSetPropertyByValue(thread, objectHandle, index, valueHandle);
3815 JSHandle<JSTaggedValue> array = ecmascript::JSSharedArray::ArrayCreate(thread, arrayLen);
3816 JSHandle<JSTaggedValue> initialValue(thread, JSTaggedValue::Undefined());
3817 JSMutableHandle<JSTaggedValue> key(thread, JSTaggedValue::Undefined());
3821 thread, JSHandle<JSObject>(array), key, initialValue, ecmascript::JSShared::SCheckMode::SKIP);
3823 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
3839 JSHandle<JSTaggedValue> result = ecmascript::JSSharedArray::FastGetPropertyByValue(thread, object, index);
3850 thread, objectHandle, index, valueHandle, true, ecmascript::SCheckMode::CHECK);
3883 JSThread *thread = vm_->GetJSThread();
3885 thread->GetCurrentEcmaContext()->ExecutePromisePendingJob();
3974 return quickFixManager->LoadPatch(thread, patchFileName, baseFileName);
3985 thread, patchFileName, patchBuffer, patchSize, baseFileName, baseBuffer, baseSize);
3993 return quickFixManager->UnloadPatch(thread, patchFileName);
4005 ecmascript::ThreadManagedScope managedScope(thread);
4008 return quickFixManager->IsQuickFixCausedException(thread, exceptionInfo, patchFileName);
4181 thread->SetTaskInfo(reinterpret_cast<uintptr_t>(taskInfo));
4182 thread->SetIsInConcurrentScope(true);
4189 return reinterpret_cast<void*>(thread->GetTaskInfo());
4194 JSThread *thread = vm->GetJSThread();
4195 thread->SetTaskInfo(reinterpret_cast<uintptr_t>(nullptr));
4196 thread->SetIsInConcurrentScope(false);
4233 // Enable cross thread execution.
4236 LOG_ECMA(WARN) << "enable cross thread execution";
4242 JSThread *thread = vm->GetJSThread();
4243 return thread->GetEnv();
4248 JSThread *thread = vm->GetJSThread();
4249 thread->SetEnv(env);
4295 JSThread *thread = vm->GetJSThread();
4296 if (thread->GetIsProfiling()) {
4297 ecmascript::ThreadManagedScope managedScope(thread);
4298 getStackBeforeCallNapiSuccess = vm->GetProfiler()->GetStackBeforeCallNapi(thread);
4306 JSThread *thread = vm->GetJSThread();
4307 if (thread->GetIsProfiling()) {
4308 ecmascript::ThreadManagedScope managedScope(thread);
4309 vm->GetProfiler()->GetStackAfterCallNapi(thread);
4347 JSThread *thread = vm->GetJSThread();
4348 ecmascript::ThreadManagedScope managedScope(thread);
4349 return EcmaContext::CreateAndInitialize(thread);
4354 JSThread *thread = vm->GetJSThread();
4355 ecmascript::ThreadManagedScope managedScope(thread);
4356 thread->SwitchCurrentContext(context);
4361 JSThread *thread = vm->GetJSThread();
4362 ecmascript::ThreadManagedScope managedScope(thread);
4363 EcmaContext::CheckAndDestroy(thread, context);
4394 if (thread != nullptr && vm->IsInitialized()) {
4396 if (thread->IsMainThreadFast()) {
4416 ecmascript::GCReason::EXTERNAL_TRIGGER>(thread);
4420 ecmascript::GCReason::EXTERNAL_TRIGGER>(thread);
4432 if (thread != nullptr && vm->IsInitialized()) {
4440 if (thread != nullptr && vm->IsInitialized()) {
4458 auto thread = vm->GetJSThread();
4459 ecmascript::ThreadManagedScope managedScope(thread);
4460 if (thread->HasPendingException()) {
4464 thread->SetException(JSNApiHelper::ToJSTaggedValue(*error));
4469 JSThread* thread = vm->GetJSThread();
4470 ecmascript::ThreadManagedScope managedScope(thread);
4471 [[maybe_unused]] ecmascript::EcmaHandleScope handleScope(thread);
4483 JSHandle<EcmaString> result = JSTaggedValue::ToString(thread, exceptionHandle);
5004 return thread->IsMainThread();
5007 // Currently only log trace on main thread
5011 return thread->IsMainThread();
5021 ecmascript::ThreadManagedScope scope(thread);
5026 << thread->GetThreadId() << " threshold: " << threshold << " duration: " << duration;
5031 tagMsg << thread->GetThreadId();
5072 ecmascript::ThreadManagedScope scope(thread);
5080 thread->GetCurrentEcmaContext()->LoadAOTFiles(aotFileName);
5088 ecmascript::ThreadManagedScope scope(thread);
5092 thread->GetCurrentEcmaContext()->LoadAOTFiles(aotFileName, cb);
5100 ecmascript::ThreadManagedScope scope(thread);
5101 EcmaContext::MountContext(thread);
5102 if (!ecmascript::JSPandaFileExecutor::ExecuteFromAbcFile(thread, fileName.c_str(), entry, needUpdate)) {
5103 if (thread->HasPendingException()) {
5104 ecmascript::JsStackInfo::BuildCrashInfo(thread);
5105 thread->GetCurrentEcmaContext()->HandleUncaughtException();
5111 EcmaContext::UnmountContext(thread);
5121 ecmascript::ThreadManagedScope scope(thread);
5123 thread, fileName.c_str(), entry, needUpdate, executeFromJob)) {
5124 if (thread->HasPendingException()) {
5125 ecmascript::JsStackInfo::BuildCrashInfo(thread);
5126 thread->GetCurrentEcmaContext()->HandleUncaughtException();
5140 ecmascript::ThreadManagedScope scope(thread);
5142 thread, fileName.c_str(), entry, needUpdate, executeFromJob)) {
5143 if (thread->HasPendingException()) {
5144 ecmascript::JsStackInfo::BuildCrashInfo(thread);
5145 thread->GetCurrentEcmaContext()->HandleUncaughtException();
5160 ecmascript::ThreadManagedScope scope(thread);
5161 if (!ecmascript::JSPandaFileExecutor::ExecuteFromBuffer(thread, data, size, entry, filename.c_str(), needUpdate)) {
5162 if (thread->HasPendingException()) {
5163 ecmascript::JsStackInfo::BuildCrashInfo(thread);
5164 thread->GetCurrentEcmaContext()->HandleUncaughtException();
5177 ecmascript::ThreadManagedScope scope(thread);
5178 int result = ecmascript::JSPandaFileExecutor::ExecuteAbcFileWithSingletonPatternFlag(thread, bundleName.c_str(),
5181 if (thread->HasPendingException()) {
5182 ecmascript::JsStackInfo::BuildCrashInfo(thread);
5183 thread->GetCurrentEcmaContext()->HandleUncaughtException();
5195 ecmascript::ThreadManagedScope scope(thread);
5196 bool result = ecmascript::JSPandaFileExecutor::IsExecuteModuleInAbcFile(thread, bundleName.c_str(),
5207 ecmascript::ThreadManagedScope scope(thread);
5208 if (!ecmascript::JSPandaFileExecutor::ExecuteModuleBuffer(thread, data, size, filename.c_str(), needUpdate)) {
5209 if (thread->HasPendingException()) {
5210 ecmascript::JsStackInfo::BuildCrashInfo(thread);
5211 thread->GetCurrentEcmaContext()->HandleUncaughtException();
5232 ecmascript::ThreadManagedScope scope(thread);
5243 if (!ModulePathHelper::CheckAndGetRecordName(thread, ohmUrl.c_str(), entryPoint)) {
5247 if (!ecmascript::JSPandaFileExecutor::ExecuteSecureWithOhmUrl(thread, data, size, filename, entryPoint)) {
5248 if (thread->HasPendingException()) {
5249 ecmascript::JsStackInfo::BuildCrashInfo(thread);
5250 thread->GetCurrentEcmaContext()->HandleUncaughtException();
5264 ecmascript::ThreadManagedScope scope(thread);
5265 if (!ecmascript::JSPandaFileExecutor::ExecuteFromBufferSecure(thread, data, size, entry, filename.c_str(),
5267 if (thread->HasPendingException()) {
5268 ecmascript::JsStackInfo::BuildCrashInfo(thread);
5269 thread->GetCurrentEcmaContext()->HandleUncaughtException();
5283 ecmascript::ThreadManagedScope scope(thread);
5284 if (!ecmascript::JSPandaFileExecutor::ExecuteModuleBufferSecure(thread, data, size, filename.c_str(),
5286 if (thread->HasPendingException()) {
5287 ecmascript::JsStackInfo::BuildCrashInfo(thread);
5288 thread->GetCurrentEcmaContext()->HandleUncaughtException();
5428 return ecmascript::EcmaHandleScope::NewHandle(thread, value);
5439 return thread->NewGlobalHandle(value);
5476 return thread->SetWeak(localAddress);
5487 return thread->SetWeak(localAddress, ref, freeGlobalCallBack, nativeFinalizeCallback);
5502 return thread->ClearWeak(localAddress);
5512 return thread->IsWeak(localAddress);
5523 thread->DisposeGlobalHandle(addr);
5540 ecmascript::ValueSerializer serializer(thread, defaultTransfer, defaultCloneShared);
5542 if (serializer.WriteValue(thread, arkValue, arkTransfer, arkCloneList)) {
5561 ecmascript::BaseDeserializer deserializer(thread, data.release(), hint);
5591 thread->GetCurrentEcmaContext()->GetPromiseRejectCallback();
5603 thread->GetCurrentEcmaContext()->SetHostPromiseRejectionTracker(HostPromiseRejectionTracker);
5604 thread->GetCurrentEcmaContext()->SetPromiseRejectCallback(
5606 thread->GetCurrentEcmaContext()->SetData(data);
5653 JSHandle<MicroJobQueue> job = thread->GetCurrentEcmaContext()->GetMicroJobQueue();
5654 MicroJobQueue::EnqueueJob(thread, job, queueType, fun, array);
5661 if (!ecmascript::JSPandaFileExecutor::ExecuteFromBuffer(thread, data, size, ENTRY_POINTER, file.c_str(), false,
5663 if (thread->HasPendingException()) {
5664 ecmascript::JsStackInfo::BuildCrashInfo(thread);
5681 JSHandle<JSTaggedValue> holeHandle(thread, JSTaggedValue::Hole());
5686 JSTaggedValue res = ObjectFastOperator::TryFastHasProperty(thread, obj.GetTaggedValue(),
5689 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
5690 return scope.Escape(JSNApiHelper::ToLocal<JSValueRef>(JSHandle<JSTaggedValue>(thread, res)));
5692 auto ret = JSTaggedValue(JSTaggedValue::HasProperty(thread, obj, keyValue));
5693 return scope.Escape(JSNApiHelper::ToLocal<JSValueRef>(JSHandle<JSTaggedValue>(thread, ret)));
5705 JSHandle<JSTaggedValue> holeHandle(thread, JSTaggedValue::Hole());
5710 JSTaggedValue res = ObjectFastOperator::TryFastHasProperty(thread, obj.GetTaggedValue(),
5713 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
5714 return scope.Escape(JSNApiHelper::ToLocal<JSValueRef>(JSHandle<JSTaggedValue>(thread, res)));
5716 auto ret = JSTaggedValue(JSTaggedValue::HasProperty(thread, obj, keyValue));
5717 return scope.Escape(JSNApiHelper::ToLocal<JSValueRef>(JSHandle<JSTaggedValue>(thread, ret)));
5729 JSHandle<JSTaggedValue> holeHandle(thread, JSTaggedValue::Hole());
5735 OperationResult ret = JSTaggedValue::GetProperty(thread, obj, keyValue);
5736 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
5740 JSTaggedValue res = ObjectFastOperator::TryFastGetPropertyByValue(thread, obj.GetTaggedValue(),
5743 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
5744 return scope.Escape(JSNApiHelper::ToLocal<JSValueRef>(JSHandle<JSTaggedValue>(thread, res)));
5747 JSTaggedValue ret = ObjectFastOperator::FastGetPropertyByValue(thread, obj.GetTaggedValue(),
5749 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
5750 return scope.Escape(JSNApiHelper::ToLocal<JSValueRef>(JSHandle<JSTaggedValue>(thread, ret)));
5762 JSHandle<JSTaggedValue> holeHandle(thread, JSTaggedValue::Hole());
5768 [[maybe_unused]] ecmascript::EcmaHandleScope handleScope(thread);
5769 auto string = thread->GetEcmaVM()->GetFactory()->InternString(keyValue);
5773 auto ret = JSTaggedValue(JSTaggedValue::DeleteProperty(thread, obj, keyValue));
5774 return scope.Escape(JSNApiHelper::ToLocal<JSValueRef>(JSHandle<JSTaggedValue>(thread, ret)));
5786 JSHandle<JSTaggedValue> holeHandle(thread, JSTaggedValue::Hole());
5793 OperationResult ret = JSTaggedValue::GetProperty(thread, obj, keyValue);
5794 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
5799 JSTaggedValue res = ObjectFastOperator::TryGetPropertyByNameThroughCacheAtLocal(thread, obj.GetTaggedValue(),
5802 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
5803 return scope.Escape(JSNApiHelper::ToLocal<JSValueRef>(JSHandle<JSTaggedValue>(thread, res)));
5806 res = ObjectFastOperator::GetPropertyByName(thread, obj.GetTaggedValue(), keyValue.GetTaggedValue());
5808 res = JSTaggedValue::GetProperty(thread, obj, keyValue).GetValue().GetTaggedValue();
5809 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
5810 return scope.Escape(JSNApiHelper::ToLocal<JSValueRef>(JSHandle<JSTaggedValue>(thread, res)));
5812 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
5813 return scope.Escape(JSNApiHelper::ToLocal<JSValueRef>(JSHandle<JSTaggedValue>(thread, res)));
5815 res = ObjectFastOperator::FastGetPropertyByValue(thread, obj.GetTaggedValue(), keyValue.GetTaggedValue());
5816 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
5817 return scope.Escape(JSNApiHelper::ToLocal<JSValueRef>(JSHandle<JSTaggedValue>(thread, res)));
5836 JSPandaFileManager::GetInstance()->LoadJSPandaFile(thread, name, entry.c_str(), false);
5838 JSHandle<JSTaggedValue> exportObj(thread, JSTaggedValue::Null());
5845 ecmascript::ModuleManager *moduleManager = thread->GetCurrentEcmaContext()->GetModuleManager();
5849 JSTaggedValue result = ecmaModule->GetModuleValue(thread, index, false);
5850 JSHandle<JSTaggedValue> exportObj(thread, result);
5856 JSTaggedValue result = ecmaModule->GetModuleValue(thread, keyHandle.GetTaggedValue(), false);
5857 JSHandle<JSTaggedValue> exportObj(thread, result);
5866 ecmascript::ModuleManager *moduleManager = thread->GetCurrentEcmaContext()->GetModuleManager();
5870 JSTaggedValue result = ecmaModule->GetModuleValue(thread, index, false);
5871 JSHandle<JSTaggedValue> exportObj(thread, result);
5877 JSTaggedValue result = ecmaModule->GetModuleValue(thread, keyHandle.GetTaggedValue(), false);
5878 JSHandle<JSTaggedValue> exportObj(thread, result);
5888 if (!ModulePathHelper::CheckAndGetRecordName(thread, ohmUrl.c_str(), recordName)) {
5892 ecmascript::ModuleManager *moduleManager = thread->GetCurrentEcmaContext()->GetModuleManager();
5895 JSTaggedValue result = ecmaModule->GetModuleValue(thread, index, false);
5896 JSHandle<JSTaggedValue> exportObj(thread, result);
5904 ecmascript::ModuleManager *moduleManager = thread->GetCurrentEcmaContext()->GetModuleManager();
5905 JSHandle<JSTaggedValue> exportObj = moduleManager->LoadNativeModule(thread, key.c_str());
5912 ecmascript::ThreadManagedScope managedScope(thread);
5918 recordNameStr = ModulePathHelper::TranslateNapiFileRequestPath(thread, module_path.c_str(), file.c_str());
5922 if (thread->HasPendingException()) {
5923 thread->GetCurrentEcmaContext()->HandleUncaughtException();
5929 recordNameStr = ModulePathHelper::TranslateNapiFileRequestPath(thread, path.c_str(), file.c_str());
5932 ecmascript::ModuleManager *moduleManager = thread->GetCurrentEcmaContext()->GetModuleManager();
5934 GetModuleNameSpaceFromFile(thread, recordNameStr, abcFilePath);
5942 ecmascript::ThreadManagedScope managedScope(thread);
5962 const GlobalEnvConstants *constants = thread->GlobalConstants();
5966 JSHandle<JSTaggedValue> catchKey(thread, constants->GetPromiseCatchString());
5970 ecmascript::EcmaInterpreter::NewRuntimeCallInfo(thread, undefined, promise, undefined, 1);
5971 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
5973 thread->CheckJSTaggedType(reject.GetTaggedValue().GetRawData());
5978 thread->CheckJSTaggedType(result.GetRawData());
5980 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
5981 return JSNApiHelper::ToLocal<PromiseRef>(JSHandle<JSTaggedValue>(thread, result));
5988 const GlobalEnvConstants *constants = thread->GlobalConstants();
5996 ecmascript::EcmaInterpreter::NewRuntimeCallInfo(thread, undefined, promise, undefined, 2); // 2: two args
5997 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
5999 thread->CheckJSTaggedType(resolver.GetTaggedValue().GetRawData());
6000 thread->CheckJSTaggedType(undefined.GetTaggedValue().GetRawData());
6005 thread->CheckJSTaggedType(result.GetRawData());
6007 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
6008 return JSNApiHelper::ToLocal<PromiseRef>(JSHandle<JSTaggedValue>(thread, result));
6015 const GlobalEnvConstants *constants = thread->GlobalConstants();
6019 JSHandle<JSTaggedValue> thenKey(thread, constants->GetPromiseThenString());
6023 ecmascript::EcmaInterpreter::NewRuntimeCallInfo(thread, undefined, promise, undefined, 2); // 2: two args
6024 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
6026 thread->CheckJSTaggedType(resolver.GetTaggedValue().GetRawData());
6027 thread->CheckJSTaggedType(undefined.GetTaggedValue().GetRawData());
6032 thread->CheckJSTaggedType(result.GetRawData());
6034 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
6035 return JSNApiHelper::ToLocal<PromiseRef>(JSHandle<JSTaggedValue>(thread, result));
6042 const GlobalEnvConstants *constants = thread->GlobalConstants();
6046 JSHandle<JSTaggedValue> thenKey(thread, constants->GetPromiseThenString());
6051 ecmascript::EcmaInterpreter::NewRuntimeCallInfo(thread, undefined, promise, undefined, 2); // 2: two args
6052 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
6054 thread->CheckJSTaggedType(resolver.GetTaggedValue().GetRawData());
6055 thread->CheckJSTaggedType(reject.GetTaggedValue().GetRawData());
6060 thread->CheckJSTaggedType(result.GetRawData());
6062 RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm));
6063 return JSNApiHelper::ToLocal<PromiseRef>(JSHandle<JSTaggedValue>(thread, result));
6106 return JSNApiHelper::ToLocal<JSValueRef>(JSHandle<JSTaggedValue>(thread, jsProxy->GetHandler()));
6114 return JSNApiHelper::ToLocal<JSValueRef>(JSHandle<JSTaggedValue>(thread, jsProxy->GetTarget()));
6145 ecmascript::ThreadManagedScope managedScope(thread);
6148 return JSNApiHelper::ToLocal<JSValueRef>(JSHandle<JSTaggedValue>(thread, set->GetValue(entry)));
6154 ecmascript::ThreadManagedScope managedScope(thread);
6169 ecmascript::ThreadManagedScope managedScope(thread);
6196 ecmascript::ThreadManagedScope managedScope(thread);
6200 return JSNApiHelper::ToLocal<JSValueRef>(JSHandle<JSTaggedValue>(thread, key.GetWeakRawValue()));
6208 return JSNApiHelper::ToLocal<JSValueRef>(JSHandle<JSTaggedValue>(thread, weakMap->GetValue(entry)));
6214 ecmascript::ThreadManagedScope managedScope(thread);
6229 ecmascript::ThreadManagedScope managedScope(thread);
6239 ecmascript::ThreadManagedScope managedScope(thread);
6241 return weakMap->Has(thread, JSNApiHelper::ToJSTaggedValue(*key));
6265 ecmascript::ThreadManagedScope managedScope(thread);
6269 return JSNApiHelper::ToLocal<JSValueRef>(JSHandle<JSTaggedValue>(thread, value.GetWeakRawValue()));
6275 ecmascript::ThreadManagedScope managedScope(thread);
6290 ecmascript::ThreadManagedScope managedScope(thread);