Lines Matching full:thread
28 JSThread *thread = argv->GetThread(); in ListConstructor() local
29 BUILTINS_API_TRACE(thread, List, Constructor); in ListConstructor()
30 [[maybe_unused]] EcmaHandleScope handleScope(thread); in ListConstructor()
31 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in ListConstructor()
35 ContainerError::BusinessError(thread, ErrorFlag::IS_NULL_ERROR, in ListConstructor()
37 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in ListConstructor()
41 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in ListConstructor()
45 JSTaggedValue singleList = TaggedSingleList::Create(thread); in ListConstructor()
46 list->SetSingleList(thread, singleList); in ListConstructor()
54 JSThread *thread = argv->GetThread(); in Add() local
55 BUILTINS_API_TRACE(thread, List, Add); in Add()
56 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Add()
59 if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIList()) { in Add()
60 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in Add()
62 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in Add()
64 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in Add()
70 JSAPIList::Add(thread, jSAPIList, value); in Add()
77 JSThread *thread = argv->GetThread(); in Insert() local
78 BUILTINS_API_TRACE(thread, List, Insert); in Insert()
79 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Insert()
82 if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIList()) { in Insert()
83 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in Insert()
85 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in Insert()
87 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in Insert()
93 … index = JSHandle<JSTaggedValue>(thread, JSTaggedValue::TryCastDoubleToInt32(index->GetDouble())); in Insert()
96 JSHandle<EcmaString> result = JSTaggedValue::ToString(thread, index.GetTaggedValue()); in Insert()
97 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in Insert()
99 …e type of \"index\" must be small integer. Received value is: " + ConvertToString(thread, *result); in Insert()
100 …JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::TYPE_ERROR, errorMsg.c_str(… in Insert()
101 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in Insert()
104 JSAPIList::Insert(thread, jSAPIList, value, index->GetInt()); in Insert()
105 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in Insert()
112 JSThread *thread = argv->GetThread(); in GetFirst() local
113 BUILTINS_API_TRACE(thread, List, GetFirst); in GetFirst()
114 [[maybe_unused]] EcmaHandleScope handleScope(thread); in GetFirst()
117 if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIList()) { in GetFirst()
118 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in GetFirst()
120 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in GetFirst()
122 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in GetFirst()
126 return jSAPIList->GetFirst(thread); in GetFirst()
132 JSThread *thread = argv->GetThread(); in GetLast() local
133 BUILTINS_API_TRACE(thread, List, GetLast); in GetLast()
134 [[maybe_unused]] EcmaHandleScope handleScope(thread); in GetLast()
137 if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIList()) { in GetLast()
138 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in GetLast()
140 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in GetLast()
142 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in GetLast()
146 return jSAPIList->GetLast(thread); in GetLast()
152 JSThread *thread = argv->GetThread(); in Has() local
153 BUILTINS_API_TRACE(thread, List, Has); in Has()
154 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Has()
157 if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIList()) { in Has()
158 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in Has()
160 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in Has()
162 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in Has()
167 return GetTaggedBoolean(jSAPIList->Has(thread, element.GetTaggedValue())); in Has()
173 JSThread *thread = argv->GetThread(); in IsEmpty() local
174 BUILTINS_API_TRACE(thread, List, IsEmpty); in IsEmpty()
175 [[maybe_unused]] EcmaHandleScope handleScope(thread); in IsEmpty()
178 if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIList()) { in IsEmpty()
179 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in IsEmpty()
181 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in IsEmpty()
183 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in IsEmpty()
187 return GetTaggedBoolean(jSAPIList->IsEmpty(thread)); in IsEmpty()
193 JSThread *thread = argv->GetThread(); in Get() local
194 BUILTINS_API_TRACE(thread, List, Get); in Get()
195 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Get()
198 if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIList()) { in Get()
199 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in Get()
201 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in Get()
203 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in Get()
209 … index = JSHandle<JSTaggedValue>(thread, JSTaggedValue::TryCastDoubleToInt32(index->GetDouble())); in Get()
212 JSHandle<EcmaString> result = JSTaggedValue::ToString(thread, index.GetTaggedValue()); in Get()
213 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in Get()
215 …e type of \"index\" must be small integer. Received value is: " + ConvertToString(thread, *result); in Get()
216 …JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::TYPE_ERROR, errorMsg.c_str(… in Get()
217 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in Get()
219 return jsAPIList->Get(thread, index->GetInt()); in Get()
225 JSThread *thread = argv->GetThread(); in GetIndexOf() local
226 BUILTINS_API_TRACE(thread, List, GetIndexOf); in GetIndexOf()
227 [[maybe_unused]] EcmaHandleScope handleScope(thread); in GetIndexOf()
230 if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIList()) { in GetIndexOf()
231 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in GetIndexOf()
233 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in GetIndexOf()
235 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in GetIndexOf()
240 return jsAPIList->GetIndexOf(thread, element.GetTaggedValue()); in GetIndexOf()
246 JSThread *thread = argv->GetThread(); in GetLastIndexOf() local
247 BUILTINS_API_TRACE(thread, List, GetLastIndexOf); in GetLastIndexOf()
248 [[maybe_unused]] EcmaHandleScope handleScope(thread); in GetLastIndexOf()
251 if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIList()) { in GetLastIndexOf()
252 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in GetLastIndexOf()
254 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in GetLastIndexOf()
256 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in GetLastIndexOf()
261 return jsAPIList->GetLastIndexOf(thread, element.GetTaggedValue()); in GetLastIndexOf()
267 JSThread *thread = argv->GetThread(); in Set() local
268 BUILTINS_API_TRACE(thread, List, Set); in Set()
269 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Set()
272 if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIList()) { in Set()
273 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in Set()
275 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in Set()
277 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in Set()
283 … index = JSHandle<JSTaggedValue>(thread, JSTaggedValue::TryCastDoubleToInt32(index->GetDouble())); in Set()
286 JSHandle<EcmaString> result = JSTaggedValue::ToString(thread, index.GetTaggedValue()); in Set()
287 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in Set()
289 …e type of \"index\" must be small integer. Received value is: " + ConvertToString(thread, *result); in Set()
290 …JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::TYPE_ERROR, errorMsg.c_str(… in Set()
291 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in Set()
294 JSTaggedValue oldValue = JSAPIList::Set(thread, jsAPIList, index->GetInt(), element); in Set()
295 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in Set()
302 JSThread *thread = argv->GetThread(); in ForEach() local
303 BUILTINS_API_TRACE(thread, List, ForEach); in ForEach()
304 [[maybe_unused]] EcmaHandleScope handleScope(thread); in ForEach()
308 …if (thisHandle->IsJSProxy() && JSHandle<JSProxy>::Cast(thisHandle)->GetTarget(thread).IsJSAPIList(… in ForEach()
309 …thisHandle = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(thisHandle)->GetTarget(thread… in ForEach()
311 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in ForEach()
313 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in ForEach()
320 … JSHandle<EcmaString> result = JSTaggedValue::ToString(thread, callbackFnHandle.GetTaggedValue()); in ForEach()
321 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in ForEach()
323 …e type of \"callbackfn\" must be callable. Received value is: " + ConvertToString(thread, *result); in ForEach()
324 …JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::TYPE_ERROR, errorMsg.c_str(… in ForEach()
325 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in ForEach()
331 JSHandle<TaggedSingleList> singleList(thread, list->GetSingleList(thread)); in ForEach()
332 uint32_t length = list->Length(thread); in ForEach()
334 JSHandle<JSTaggedValue> undefined = thread->GlobalConstants()->GetHandledUndefined(); in ForEach()
340 JSTaggedValue value = singleList->GetElement(thread, valueNode); in ForEach()
342 …EcmaInterpreter::NewRuntimeCallInfo(thread, callbackFnHandle, thisArgHandle, undefined, argsLength… in ForEach()
343 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in ForEach()
346 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, funcResult); in ForEach()
355 JSThread *thread = argv->GetThread(); in Clear() local
356 BUILTINS_API_TRACE(thread, List, Clear); in Clear()
357 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Clear()
360 if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIList()) { in Clear()
361 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in Clear()
363 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in Clear()
365 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in Clear()
369 jsAPIList->Clear(thread); in Clear()
376 JSThread *thread = argv->GetThread(); in RemoveByIndex() local
377 BUILTINS_API_TRACE(thread, List, RemoveByIndex); in RemoveByIndex()
378 [[maybe_unused]] EcmaHandleScope handleScope(thread); in RemoveByIndex()
381 if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIList()) { in RemoveByIndex()
382 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in RemoveByIndex()
384 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in RemoveByIndex()
386 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in RemoveByIndex()
391 … index = JSHandle<JSTaggedValue>(thread, JSTaggedValue::TryCastDoubleToInt32(index->GetDouble())); in RemoveByIndex()
394 JSHandle<EcmaString> result = JSTaggedValue::ToString(thread, index.GetTaggedValue()); in RemoveByIndex()
395 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in RemoveByIndex()
397 …e type of \"index\" must be small integer. Received value is: " + ConvertToString(thread, *result); in RemoveByIndex()
398 …JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::TYPE_ERROR, errorMsg.c_str(… in RemoveByIndex()
399 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in RemoveByIndex()
402 JSTaggedValue result = JSAPIList::RemoveByIndex(thread, jsAPIList, index->GetInt()); in RemoveByIndex()
403 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in RemoveByIndex()
410 JSThread *thread = argv->GetThread(); in Remove() local
411 BUILTINS_API_TRACE(thread, List, Remove); in Remove()
412 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Remove()
415 if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIList()) { in Remove()
416 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in Remove()
418 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in Remove()
420 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in Remove()
425 return jsAPIList->Remove(thread, element.GetTaggedValue()); in Remove()
431 JSThread *thread = argv->GetThread(); in ReplaceAllElements() local
432 BUILTINS_API_TRACE(thread, List, ReplaceAllElements); in ReplaceAllElements()
435 …if (thisHandle->IsJSProxy() && JSHandle<JSProxy>::Cast(thisHandle)->GetTarget(thread).IsJSAPIList(… in ReplaceAllElements()
436 …thisHandle = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(thisHandle)->GetTarget(thread… in ReplaceAllElements()
438 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in ReplaceAllElements()
440 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in ReplaceAllElements()
445 … JSHandle<EcmaString> result = JSTaggedValue::ToString(thread, callbackFnHandle.GetTaggedValue()); in ReplaceAllElements()
446 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in ReplaceAllElements()
448 …e type of \"callbackfn\" must be callable. Received value is: " + ConvertToString(thread, *result); in ReplaceAllElements()
449 …JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::TYPE_ERROR, errorMsg.c_str(… in ReplaceAllElements()
450 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in ReplaceAllElements()
453 return JSAPIList::ReplaceAllElements(thread, thisHandle, callbackFnHandle, thisArgHandle); in ReplaceAllElements()
459 JSThread *thread = argv->GetThread(); in Equal() local
460 BUILTINS_API_TRACE(thread, List, Equal); in Equal()
461 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Equal()
464 if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIList()) { in Equal()
465 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in Equal()
467 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in Equal()
469 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in Equal()
475 if (obj->IsJSProxy() && JSHandle<JSProxy>::Cast(obj)->GetTarget(thread).IsJSAPIList()) { in Equal()
476 obj = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(obj)->GetTarget(thread)); in Equal()
482 return jsAPIList->Equal(thread, handleObj); in Equal()
488 JSThread *thread = argv->GetThread(); in Sort() local
489 BUILTINS_API_TRACE(thread, List, Sort); in Sort()
490 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Sort()
493 if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIList()) { in Sort()
494 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in Sort()
496 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in Sort()
498 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in Sort()
503 … JSHandle<EcmaString> result = JSTaggedValue::ToString(thread, callbackFnHandle.GetTaggedValue()); in Sort()
504 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in Sort()
506 …e type of \"comparator\" must be callable. Received value is: " + ConvertToString(thread, *result); in Sort()
507 …JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::TYPE_ERROR, errorMsg.c_str(… in Sort()
508 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in Sort()
510 return JSAPIList::Sort(thread, self, callbackFnHandle); in Sort()
516 JSThread *thread = argv->GetThread(); in GetIteratorObj() local
517 BUILTINS_API_TRACE(thread, List, GetIteratorObj); in GetIteratorObj()
518 [[maybe_unused]] EcmaHandleScope handleScope(thread); in GetIteratorObj()
520 JSHandle<JSTaggedValue> iter = JSAPIListIterator::CreateListIterator(thread, self); in GetIteratorObj()
527 JSThread *thread = argv->GetThread(); in ConvertToArray() local
528 BUILTINS_API_TRACE(thread, List, ConvertToArray); in ConvertToArray()
529 [[maybe_unused]] EcmaHandleScope handleScope(thread); in ConvertToArray()
532 if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIList()) { in ConvertToArray()
533 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in ConvertToArray()
535 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in ConvertToArray()
537 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in ConvertToArray()
541 return JSAPIList::ConvertToArray(thread, jsAPIList); in ConvertToArray()
547 JSThread *thread = argv->GetThread(); in GetSubList() local
548 BUILTINS_API_TRACE(thread, List, GetSubList); in GetSubList()
549 [[maybe_unused]] EcmaHandleScope handleScope(thread); in GetSubList()
552 if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIList()) { in GetSubList()
553 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in GetSubList()
555 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in GetSubList()
557 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in GetSubList()
563 …fromIndex = JSHandle<JSTaggedValue>(thread, JSTaggedValue::TryCastDoubleToInt32(fromIndex->GetDoub… in GetSubList()
567 JSHandle<EcmaString> result = JSTaggedValue::ToString(thread, fromIndex.GetTaggedValue()); in GetSubList()
568 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in GetSubList()
570 …"The type of \"fromIndex\" must be number. Received value is: " + ConvertToString(thread, *result); in GetSubList()
571 …JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::TYPE_ERROR, errorMsg.c_str(… in GetSubList()
572 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in GetSubList()
579 …toIndex = JSHandle<JSTaggedValue>(thread, JSTaggedValue::TryCastDoubleToInt32(toIndex->GetDouble()… in GetSubList()
583 JSHandle<EcmaString> result = JSTaggedValue::ToString(thread, toIndex.GetTaggedValue()); in GetSubList()
584 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in GetSubList()
586 … "The type of \"toIndex\" must be number. Received value is: " + ConvertToString(thread, *result); in GetSubList()
587 …JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::TYPE_ERROR, errorMsg.c_str(… in GetSubList()
588 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in GetSubList()
592 …JSTaggedValue newList = JSAPIList::GetSubList(thread, jsAPIList, fromIndex->GetInt(), toIndex->Get… in GetSubList()
593 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in GetSubList()
600 JSThread *thread = argv->GetThread(); in Length() local
601 BUILTINS_API_TRACE(thread, List, Length); in Length()
602 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Length()
605 if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIList()) { in Length()
606 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in Length()
608 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in Length()
610 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in Length()
614 return JSTaggedValue(jsAPIList->Length(thread)); in Length()