Home
last modified time | relevance | path

Searched refs:JSProxy (Results 1 – 20 of 20) sorted by relevance

/ark/js_runtime/ecmascript/
Djs_proxy.h23 class JSProxy final : public ECMAObject {
25 CAST_CHECK(JSProxy, IsJSProxy);
28 static JSHandle<JSProxy> ProxyCreate(JSThread *thread, const JSHandle<JSTaggedValue> &target,
31 static JSTaggedValue GetPrototype(JSThread *thread, const JSHandle<JSProxy> &proxy);
33 …static bool SetPrototype(JSThread *thread, const JSHandle<JSProxy> &proxy, const JSHandle<JSTagged…
35 static bool IsExtensible(JSThread *thread, const JSHandle<JSProxy> &proxy);
37 static bool PreventExtensions(JSThread *thread, const JSHandle<JSProxy> &proxy);
39 …static bool GetOwnProperty(JSThread *thread, const JSHandle<JSProxy> &proxy, const JSHandle<JSTagg…
42 …static bool DefineOwnProperty(JSThread *thread, const JSHandle<JSProxy> &proxy, const JSHandle<JST…
45 …static bool HasProperty(JSThread *thread, const JSHandle<JSProxy> &proxy, const JSHandle<JSTaggedV…
[all …]
Djs_proxy.cpp26 JSHandle<JSProxy> JSProxy::ProxyCreate(JSThread *thread, const JSHandle<JSTaggedValue> &target, in ProxyCreate()
32 JSHandle<JSProxy>(thread, JSTaggedValue::Exception())); in ProxyCreate()
38 JSHandle<JSProxy>(thread, JSTaggedValue::Exception())); in ProxyCreate()
49 JSTaggedValue JSProxy::GetPrototype(JSThread *thread, const JSHandle<JSProxy> &proxy) in GetPrototype()
105 bool JSProxy::SetPrototype(JSThread *thread, const JSHandle<JSProxy> &proxy, const JSHandle<JSTagge… in SetPrototype()
164 bool JSProxy::IsExtensible(JSThread *thread, const JSHandle<JSProxy> &proxy) in IsExtensible()
209 bool JSProxy::PreventExtensions(JSThread *thread, const JSHandle<JSProxy> &proxy) in PreventExtensions()
255 bool JSProxy::GetOwnProperty(JSThread *thread, const JSHandle<JSProxy> &proxy, const JSHandle<JSTag… in GetOwnProperty()
359 bool JSProxy::DefineOwnProperty(JSThread *thread, const JSHandle<JSProxy> &proxy, const JSHandle<JS… in DefineOwnProperty()
445 bool JSProxy::HasProperty(JSThread *thread, const JSHandle<JSProxy> &proxy, const JSHandle<JSTagged… in HasProperty()
[all …]
Djs_tagged_value.cpp492 return JSProxy::GetProperty(thread, JSHandle<JSProxy>(obj), key); in GetProperty()
510 return JSProxy::GetProperty(thread, JSHandle<JSProxy>(obj), keyHandle); in GetProperty()
530 return JSProxy::GetProperty(thread, JSHandle<JSProxy>(obj), key, receiver); in GetProperty()
552 success = JSProxy::SetProperty(thread, JSHandle<JSProxy>(obj), key, value, mayThrow); in SetProperty()
576 success = JSProxy::SetProperty(thread, JSHandle<JSProxy>(obj), keyHandle, value, mayThrow); in SetProperty()
604 … success = JSProxy::SetProperty(thread, JSHandle<JSProxy>(obj), key, value, receiver, mayThrow); in SetProperty()
622 return JSProxy::DeleteProperty(thread, JSHandle<JSProxy>(obj), key); in DeleteProperty()
679 return JSProxy::DefineOwnProperty(thread, JSHandle<JSProxy>(obj), key, desc); in DefineOwnProperty()
697 return JSProxy::GetOwnProperty(thread, JSHandle<JSProxy>(obj), key, desc); in GetOwnProperty()
712 return JSProxy::SetPrototype(thread, JSHandle<JSProxy>(obj), proto); in SetPrototype()
[all …]
Djs_object.cpp66 return JSProxy::ConstCast(obj)->GetMethod(); in GetCallTarget()
514 …return JSProxy::SetProperty(thread, JSHandle<JSProxy>::Cast(holder), key, value, receiver, mayThro… in SetProperty()
516 …return JSProxy::SetProperty(thread, JSHandle<JSProxy>::Cast(holder), op->GetKey(), value, receiver… in SetProperty()
555 JSProxy::GetOwnProperty(thread, JSHandle<JSProxy>::Cast(receiver), key, existDesc); in SetProperty()
567 … return JSProxy::DefineOwnProperty(thread, JSHandle<JSProxy>::Cast(receiver), key, valueDesc); in SetProperty()
715 … return JSProxy::GetProperty(thread, JSHandle<JSProxy>::Cast(holder), op->GetKey(), receiver) in GetProperty()
719 return JSProxy::GetProperty(thread, JSHandle<JSProxy>::Cast(holder), op->GetKey(), receiver) in GetProperty()
990 return JSProxy::GetPrototype(thread, JSHandle<JSProxy>(obj)); in GetPrototype()
1037 return JSProxy::HasProperty(thread, JSHandle<JSProxy>::Cast(holder), key); in HasProperty()
1051 return JSProxy::HasProperty(thread, JSHandle<JSProxy>::Cast(holder), key); in HasProperty()
[all …]
Djs_function.cpp270 return JSProxy::CallInternal(thread, JSHandle<JSProxy>(func), thisArg, argc, argv); in Call()
292 return JSProxy::ConstructInternal(thread, JSHandle<JSProxy>(func), argc, argv, target); in Construct()
470 JSHandle<JSProxy> proxyHandle(thread, proxy); in ProxyRevocFunctions()
Dobject_factory.h47 class JSProxy; variable
163 JSHandle<JSProxyRevocFunction> NewJSProxyRevocFunction(const JSHandle<JSProxy> &proxy,
226 …JSHandle<JSProxy> NewJSProxy(const JSHandle<JSTaggedValue> &target, const JSHandle<JSTaggedValue> …
Dglobal_env_constants.cpp85 factory->NewEcmaDynClass(dynClassClass, JSProxy::SIZE, JSType::JS_PROXY)); in InitRootsClass()
120 …JSHClass *jsProxyCallableClass = *factory->NewEcmaDynClass(dynClassClass, JSProxy::SIZE, JSType::J… in InitRootsClass()
125 …JSHClass *jsProxyConstructClass = *factory->NewEcmaDynClass(dynClassClass, JSProxy::SIZE, JSType::… in InitRootsClass()
Djs_tagged_value-inl.h315 return JSProxy::IsExtensible(thread, JSHandle<JSProxy>(thread, *this)); in IsExtensible()
654 return JSProxy::Cast(GetTaggedObject())->IsArray(thread); in IsArray()
Druntime_trampolines.cpp113 CONVERT_ARG_HANDLE_CHECKED(JSProxy, proxy, 0); in DEF_RUNTIME_TRAMPOLINES()
118 auto result = JSProxy::SetProperty(thread, proxy, index, value, receiver, argMayThrow.IsTrue()); in DEF_RUNTIME_TRAMPOLINES()
Dobject_factory.cpp1041 JSHandle<JSProxyRevocFunction> ObjectFactory::NewJSProxyRevocFunction(const JSHandle<JSProxy> &prox… in NewJSProxyRevocFunction()
1415 JSHandle<JSProxy> ObjectFactory::NewJSProxy(const JSHandle<JSTaggedValue> &target, in NewJSProxy()
1432 JSHandle<JSProxy> proxy(thread_, header); in NewJSProxy()
Ddump.cpp483 JSProxy::Cast(obj)->Dump(thread, os); in DumpObject()
1417 void JSProxy::Dump(JSThread *thread, std::ostream &os) const in Dump()
2457 JSProxy::Cast(obj)->DumpForSnapshot(thread, vec); in DumpObject()
3037 void JSProxy::DumpForSnapshot([[maybe_unused]] JSThread *thread, in DumpForSnapshot()
/ark/js_runtime/ecmascript/tests/
Djs_proxy_test.cpp82 JSHandle<JSProxy> proxyHandle = JSProxy::ProxyCreate(thread, targetHandle, handlerHandle); in HWTEST_F_L0()
85 EXPECT_EQ(JSProxy::GetProperty(thread, proxyHandle, key).GetValue()->GetInt(), 1); in HWTEST_F_L0()
87 JSProxy::GetOwnProperty(thread, proxyHandle, key, desc); in HWTEST_F_L0()
114 JSHandle<JSProxy> proxyHandle = JSProxy::ProxyCreate(thread, targetHandle, handlerHandle); in HWTEST_F_L0()
117 EXPECT_EQ(JSProxy::GetProperty(thread, proxyHandle, key).GetValue()->GetInt(), 1); in HWTEST_F_L0()
126 JSHandle<JSProxy> proxyHandle2(JSProxy::ProxyCreate(thread, targetHandle, handlerHandle)); in HWTEST_F_L0()
129 EXPECT_EQ(JSProxy::GetProperty(thread, proxyHandle2, key2).GetValue()->GetInt(), 10); in HWTEST_F_L0()
155 JSHandle<JSProxy> proxyHandle = JSProxy::ProxyCreate(thread, targetHandle, handlerHandle); in HWTEST_F_L0()
159 JSProxy::GetOwnProperty(thread, proxyHandle, key, desc); in HWTEST_F_L0()
169 JSHandle<JSProxy> proxyHandle2 = JSProxy::ProxyCreate(thread, targetHandle, handlerHandle); in HWTEST_F_L0()
[all …]
Ddump_test.cpp483 CHECK_DUMP_FILEDS(ECMAObject::SIZE, JSProxy::SIZE, 3) in HWTEST_F_L0()
485 JSHandle<JSProxy> proxy = factory->NewJSProxy(emptyObj, emptyObj); in HWTEST_F_L0()
/ark/js_runtime/ecmascript/builtins/
Dbuiltins_proxy.cpp39 …JSHandle<JSProxy> proxy = JSProxy::ProxyCreate(argv->GetThread(), GetCallArg(argv, 0), GetCallArg(… in ProxyConstructor()
53 … JSHandle<JSProxy> proxy = JSProxy::ProxyCreate(thread, GetCallArg(argv, 0), GetCallArg(argv, 1)); in Revocable()
Dbuiltins_global.cpp517 JSHandle<JSProxy> proxy(GetConstructor(msg)); in CallJsProxy()
528 … return JSProxy::CallInternal(thread, proxy, thisObj, argsList->GetLength(), arguments->GetArgv()); in CallJsProxy()
/ark/js_runtime/ecmascript/interpreter/
Dslow_runtime_helper.cpp59 …JSTaggedValue jsObj = JSProxy::ConstructInternal(thread, JSHandle<JSProxy>(func), argc, argv, newT… in NewObject()
188 JSTaggedValue ConstructProxy(JSThread *thread, JSHandle<JSProxy> ctor, JSHandle<JSTaggedValue> newT… in ConstructProxy()
265 …return ConstructProxy(thread, JSHandle<JSProxy>::Cast(ctor), newTarget, preArgs, argsCount, baseAr… in Construct()
Dfast_runtime_stub-inl.h879 return JSProxy::SetProperty( in SetElement()
880 … thread, JSHandle<JSProxy>(thread, holder), JSHandle<JSTaggedValue>(thread, JSTaggedValue(index)), in SetElement()
1002 …return JSProxy::SetProperty(thread, JSHandle<JSProxy>(thread, holder), JSHandle<JSTaggedValue>(thr… in SetPropertyByName()
/ark/js_runtime/ecmascript/snapshot/mem/
Dsnapshot_serialize.cpp1131 … int befourFields = static_cast<int>((JSProxy::METHOD_OFFSET - OBJECT_HEADER_SIZE) / TAGGED_SIZE); in JSProxySerialize()
1140 auto jsproxy = static_cast<JSProxy *>(objectHeader); in JSProxySerialize()
1141 size_t methodOffset = JSProxy::METHOD_OFFSET; in JSProxySerialize()
1146 size_t afterOffset = JSProxy::METHOD_OFFSET + TAGGED_SIZE; in JSProxySerialize()
1148 uintptr_t afterStartAddr = ToUintPtr(objectHeader) + JSProxy::METHOD_OFFSET + TAGGED_SIZE; in JSProxySerialize()
1205 auto object = reinterpret_cast<JSProxy *>(objectHeader); in JSProxyDeserialize()
1209 auto befourMethod = JSProxy::METHOD_OFFSET - OBJECT_HEADER_SIZE; in JSProxyDeserialize()
1216 size_t nativeAddr = ToUintPtr(object) + JSProxy::METHOD_OFFSET; in JSProxyDeserialize()
1223 auto afterMethod = objectSize - JSProxy::METHOD_OFFSET - TAGGED_SIZE; in JSProxyDeserialize()
1226 size_t afterAddr = ToUintPtr(objectHeader) + JSProxy::METHOD_OFFSET + TAGGED_SIZE; in JSProxyDeserialize()
/ark/js_runtime/ecmascript/base/
Djson_stringifier.cpp380 JSProxy::Cast(tagValue.GetTaggedObject())->IsArray(thread_))) { in SerializeJSONProperty()
536 JSHandle<JSProxy> proxy(object); in SerializeJSProxy()
538 … JSHandle<JSTaggedValue> lenghHandle = JSProxy::GetProperty(thread_, proxy, lengthKey).GetValue(); in SerializeJSProxy()
545 … JSHandle<JSTaggedValue> valHandle = JSProxy::GetProperty(thread_, proxy, handleKey_).GetValue(); in SerializeJSProxy()
/ark/js_runtime/ecmascript/mem/
Dobject_xray-inl.h200 JSProxy::Cast(object)->VisitRangeSlot(visitor); in VisitObjectBody()