• Home
  • Raw
  • Download

Lines Matching refs:thread_

39     factory_ = thread_->GetEcmaVM()->GetFactory();  in Stringify()
40 …JSHandle<JSTaggedValue> jsonCache = thread_->GetEcmaVM()->GetGlobalEnv()->GetJsonObjectHclassCache… in Stringify()
47 handleValue_ = JSMutableHandle<JSTaggedValue>(thread_, tagValue); in Stringify()
48 handleKey_ = JSMutableHandle<JSTaggedValue>(thread_, factory_->GetEmptyString()); in Stringify()
52 RETURN_HANDLE_IF_ABRUPT_COMPLETION(JSTaggedValue, thread_); in Stringify()
58 RETURN_HANDLE_IF_ABRUPT_COMPLETION(JSTaggedValue, thread_); in Stringify()
63 return thread_->GlobalConstants()->GetHandledUndefined(); in Stringify()
70 JSHandle<JSTaggedValue> undefined = thread_->GlobalConstants()->GetHandledUndefined(); in GetSerializeValue()
72 JSHandle<JSTaggedValue> toJson = thread_->GlobalConstants()->GetHandledToJsonString(); in GetSerializeValue()
74thread_, ObjectFastOperator::FastGetPropertyByValue(thread_, tagValue, toJson.GetTaggedValue())); in GetSerializeValue()
76 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread_); in GetSerializeValue()
81 …EcmaRuntimeCallInfo *info = EcmaInterpreter::NewRuntimeCallInfo(thread_, toJsonFun, value, undefin… in GetSerializeValue()
82 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread_); in GetSerializeValue()
86 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread_); in GetSerializeValue()
114 … result_ += ConvertToString(*base::NumberHelper::NumberToString(thread_, tagValue)); in SerializeJSONProperty()
124 JSHandle<JSTaggedValue> valHandle(thread_, tagValue); in SerializeJSONProperty()
128 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread_); in SerializeJSONProperty()
137 auto string = JSHandle<EcmaString>(thread_, in SerializeJSONProperty()
138 EcmaStringAccessor::Flatten(thread_->GetEcmaVM(), strHandle)); in SerializeJSONProperty()
146 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, JSTaggedValue::Exception()); in SerializeJSONProperty()
152 … THROW_TYPE_ERROR_AND_RETURN(thread_, "cannot serialize a BigInt", JSTaggedValue::Exception()); in SerializeJSONProperty()
158 JSProxy::Cast(tagValue.GetTaggedObject())->IsArray(thread_))) { in SerializeJSONProperty()
160 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread_); in SerializeJSONProperty()
163 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread_); in SerializeJSONProperty()
185 …str = ConvertToString(*JSTaggedValue::ToString(thread_, key), StringConvertedUsage::LOGICOPERATION… in SerializeObjectKey()
218 THROW_TYPE_ERROR_AND_RETURN(thread_, "stack contains value", true); in SerializeJSONObject()
227 JSHandle<TaggedArray> propertyArray = JSObject::EnumerableOwnNames(thread_, obj); in SerializeJSONObject()
228 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in SerializeJSONObject()
232 …JSHandle<JSTaggedValue> valueHandle = JSTaggedValue::GetProperty(thread_, value, handleKey_).GetVa… in SerializeJSONObject()
233 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in SerializeJSONObject()
236 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in SerializeJSONObject()
247 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in SerializeJSONObject()
258 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in SerializeJSONObject()
262 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in SerializeJSONObject()
268 auto strCache = thread_->GetCurrentEcmaContext()->GetJsonStringifyCache(index); in SerializeJSONObject()
272 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in SerializeJSONObject()
276 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in SerializeJSONObject()
282 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in SerializeJSONObject()
286 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in SerializeJSONObject()
304 THROW_TYPE_ERROR_AND_RETURN(thread_, "stack contains value", true); in SerializeJSProxy()
309 JSHandle<JSTaggedValue> lengthKey = thread_->GlobalConstants()->GetHandledLengthString(); in SerializeJSProxy()
310 … JSHandle<JSTaggedValue> lenghHandle = JSProxy::GetProperty(thread_, proxy, lengthKey).GetValue(); in SerializeJSProxy()
311 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in SerializeJSProxy()
312 JSTaggedNumber lenNumber = JSTaggedValue::ToLength(thread_, lenghHandle); in SerializeJSProxy()
313 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in SerializeJSProxy()
317 … JSHandle<JSTaggedValue> valHandle = JSProxy::GetProperty(thread_, proxy, handleKey_).GetValue(); in SerializeJSProxy()
318 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in SerializeJSProxy()
324 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in SerializeJSProxy()
330 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in SerializeJSProxy()
346 THROW_TYPE_ERROR_AND_RETURN(thread_, "stack contains value", true); in SerializeJSArray()
354 …JSTaggedValue tagVal = ObjectFastOperator::FastGetPropertyByIndex(thread_, value.GetTaggedValue(),… in SerializeJSArray()
355 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in SerializeJSArray()
357 … tagVal = JSObject::CallGetter(thread_, AccessorData::Cast(tagVal.GetTaggedObject()), value); in SerializeJSArray()
358 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in SerializeJSArray()
368 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in SerializeJSArray()
372 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in SerializeJSArray()
388 auto priStr = JSTaggedValue::ToString(thread_, primitiveRef); in SerializePrimitiveRef()
389 RETURN_IF_ABRUPT_COMPLETION(thread_); in SerializePrimitiveRef()
394 auto priNum = JSTaggedValue::ToNumber(thread_, primitiveRef); in SerializePrimitiveRef()
395 RETURN_IF_ABRUPT_COMPLETION(thread_); in SerializePrimitiveRef()
397 result_ += ConvertToString(*base::NumberHelper::NumberToString(thread_, priNum)); in SerializePrimitiveRef()
404 THROW_TYPE_ERROR(thread_, "cannot serialize a BigInt"); in SerializePrimitiveRef()
418 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in TryCacheSerializeElements()
422 JSHandle<TaggedArray> elementsArr(thread_, obj->GetElements()); in TryCacheSerializeElements()
432 sortArr.emplace_back(JSHandle<JSTaggedValue>(thread_, numberKey)); in TryCacheSerializeElements()
443 value = JSObject::CallGetter(thread_, AccessorData::Cast(value.GetTaggedObject()), in TryCacheSerializeElements()
445 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in TryCacheSerializeElements()
449 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in TryCacheSerializeElements()
465 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in SerializeElementsWithCache()
469 JSHandle<TaggedArray> elementsArr(thread_, obj->GetElements()); in SerializeElementsWithCache()
476 value = JSObject::CallGetter(thread_, AccessorData::Cast(value.GetTaggedObject()), in SerializeElementsWithCache()
478 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in SerializeElementsWithCache()
482 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in SerializeElementsWithCache()
491 JSHandle<TaggedArray> propertiesArr(thread_, obj->GetProperties()); in TryCacheSerializeKeys()
493 JSHandle<JSHClass> jsHclass(thread_, obj->GetJSHClass()); in TryCacheSerializeKeys()
495 if (JSObject::GetEnumCacheKind(thread_, enumCache) == EnumCacheKind::ONLY_OWN_KEYS) { in TryCacheSerializeKeys()
496 JSHandle<TaggedArray> cache(thread_, enumCache); in TryCacheSerializeKeys()
506 int index = JSHClass::FindPropertyEntry(thread_, *jsHclass, key); in TryCacheSerializeKeys()
516 … value = JSObject::CallGetter(thread_, AccessorData::Cast(value.GetTaggedObject()), in TryCacheSerializeKeys()
518 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in TryCacheSerializeKeys()
522 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in TryCacheSerializeKeys()
536 int index = JSHClass::FindPropertyEntry(thread_, *jsHclass, key); in TryCacheSerializeKeys()
546 … value = JSObject::CallGetter(thread_, AccessorData::Cast(value.GetTaggedObject()), in TryCacheSerializeKeys()
548 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in TryCacheSerializeKeys()
552 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in TryCacheSerializeKeys()
570 …air<JSHandle<JSTaggedValue>, PropertyAttributes> pair(JSHandle<JSTaggedValue>(thread_, key), attr); in TryCacheSerializeKeys()
580 value = JSObject::CallGetter(thread_, AccessorData::Cast(value.GetTaggedObject()), in TryCacheSerializeKeys()
582 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in TryCacheSerializeKeys()
586 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in TryCacheSerializeKeys()
602 …std::pair<JSHandle<JSTaggedValue>, PropertyAttributes> pair(JSHandle<JSTaggedValue>(thread_, key),… in TryCacheSerializeKeys()
612 value = JSObject::CallGetter(thread_, AccessorData::Cast(value.GetTaggedObject()), in TryCacheSerializeKeys()
614 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in TryCacheSerializeKeys()
618 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in TryCacheSerializeKeys()
626 JSHandle<JSHClass> jsHclass(thread_, obj->GetJSHClass()); in SerializeKeysWithCache()
627 JSHandle<TaggedArray> propertiesArr(thread_, obj->GetProperties()); in SerializeKeysWithCache()
639 value = JSObject::CallGetter(thread_, AccessorData::Cast(value.GetTaggedObject()), in SerializeKeysWithCache()
641 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in SerializeKeysWithCache()
645 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in SerializeKeysWithCache()
657 value = JSObject::CallGetter(thread_, AccessorData::Cast(value.GetTaggedObject()), in SerializeKeysWithCache()
659 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in SerializeKeysWithCache()
663 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in SerializeKeysWithCache()
674 value = JSObject::CallGetter(thread_, AccessorData::Cast(value.GetTaggedObject()), in SerializeKeysWithCache()
676 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in SerializeKeysWithCache()
680 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in SerializeKeysWithCache()
689 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in AppendJsonString()
699 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in AppendJsonString()
711 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in FastAppendJsonString()
720 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in FastAppendJsonString()
737 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in DefaultSerializeElements()
741 JSHandle<TaggedArray> elementsArr(thread_, obj->GetElements()); in DefaultSerializeElements()
751 sortArr.emplace_back(JSHandle<JSTaggedValue>(thread_, numberKey)); in DefaultSerializeElements()
762 value = JSObject::CallGetter(thread_, AccessorData::Cast(value.GetTaggedObject()), in DefaultSerializeElements()
764 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in DefaultSerializeElements()
768 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in DefaultSerializeElements()
776 JSHandle<TaggedArray> propertiesArr(thread_, obj->GetProperties()); in DefaultSerializeKeys()
778 JSHandle<JSHClass> jsHclass(thread_, obj->GetJSHClass()); in DefaultSerializeKeys()
780 if (JSObject::GetEnumCacheKind(thread_, enumCache) == EnumCacheKind::ONLY_OWN_KEYS) { in DefaultSerializeKeys()
781 JSHandle<TaggedArray> cache(thread_, enumCache); in DefaultSerializeKeys()
791 int index = JSHClass::FindPropertyEntry(thread_, *jsHclass, key); in DefaultSerializeKeys()
801 … value = JSObject::CallGetter(thread_, AccessorData::Cast(value.GetTaggedObject()), in DefaultSerializeKeys()
803 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in DefaultSerializeKeys()
807 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in DefaultSerializeKeys()
821 int index = JSHClass::FindPropertyEntry(thread_, *jsHclass, key); in DefaultSerializeKeys()
831 … value = JSObject::CallGetter(thread_, AccessorData::Cast(value.GetTaggedObject()), in DefaultSerializeKeys()
833 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in DefaultSerializeKeys()
837 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in DefaultSerializeKeys()
855 …air<JSHandle<JSTaggedValue>, PropertyAttributes> pair(JSHandle<JSTaggedValue>(thread_, key), attr); in DefaultSerializeKeys()
865 value = JSObject::CallGetter(thread_, AccessorData::Cast(value.GetTaggedObject()), in DefaultSerializeKeys()
867 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in DefaultSerializeKeys()
871 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in DefaultSerializeKeys()
887 …std::pair<JSHandle<JSTaggedValue>, PropertyAttributes> pair(JSHandle<JSTaggedValue>(thread_, key),… in DefaultSerializeKeys()
897 value = JSObject::CallGetter(thread_, AccessorData::Cast(value.GetTaggedObject()), in DefaultSerializeKeys()
899 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in DefaultSerializeKeys()
903 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in DefaultSerializeKeys()
912 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in AppendJsonString()
921 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in AppendJsonString()
932 JSHandle<JSTaggedValue> value(thread_, object); in DefaultSerializeObject()
935 THROW_TYPE_ERROR_AND_RETURN(thread_, "stack contains value", true); in DefaultSerializeObject()
944 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in DefaultSerializeObject()
948 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false); in DefaultSerializeObject()