• Home
  • Raw
  • Download

Lines Matching full:handler

24 // ES6 9.5.15 ProxyCreate(target, handler)
26 const JSHandle<JSTaggedValue> &handler) in ProxyCreate() argument
34 // 2. If Type(handler) is not Object, throw a TypeError exception. in ProxyCreate()
35 if (!handler->IsECMAObject()) { in ProxyCreate()
36 THROW_TYPE_ERROR_AND_RETURN(thread, "ProxyCreate: handler is not Object", in ProxyCreate()
43 // 9. Set the [[ProxyHandler]] internal slot of P to handler. in ProxyCreate()
44 return thread->GetEcmaVM()->GetFactory()->NewJSProxy(target, handler); in ProxyCreate()
52 // 1. Let handler be the value of the [[ProxyHandler]] internal slot of O. in GetPrototype()
53 JSHandle<JSTaggedValue> handler(thread, proxy->GetHandler()); in GetPrototype() local
54 // 2. If handler is null, throw a TypeError exception. in GetPrototype()
55 if (handler->IsNull()) { in GetPrototype()
56 …THROW_TYPE_ERROR_AND_RETURN(thread, "JSProxy::GetPrototype: handler is null", JSTaggedValue::Excep… in GetPrototype()
58 // 3. Assert: Type(handler) is Object. in GetPrototype()
59 ASSERT(handler->IsECMAObject()); in GetPrototype()
62 // 5. Let trap be GetMethod(handler, "getPrototypeOf"). in GetPrototype()
64 JSHandle<JSTaggedValue> trap = JSObject::GetMethod(thread, handler, name); in GetPrototype()
72 // 8. Let handlerProto be Call(trap, handler, «target»). in GetPrototype()
74 …EcmaRuntimeCallInfo *info = EcmaInterpreter::NewRuntimeCallInfo(thread, trap, handler, undefined, … in GetPrototype()
114 // 2. Let handler be the value of the [[ProxyHandler]] internal slot of O. in SetPrototype()
115 JSTaggedValue handler = proxy->GetHandler(); in SetPrototype() local
116 // 3. If handler is null, throw a TypeError exception. in SetPrototype()
117 if (handler.IsNull()) { in SetPrototype()
118 THROW_TYPE_ERROR_AND_RETURN(thread, "JSProxy::SetPrototype: handler is null", false); in SetPrototype()
120 // 4. Assert: Type(handler) is Object. in SetPrototype()
121 ASSERT(handler.IsECMAObject()); in SetPrototype()
124 // 6. Let trap be GetMethod(handler, "setPrototypeOf"). in SetPrototype()
126 …e<JSTaggedValue> trap(JSObject::GetMethod(thread, JSHandle<JSTaggedValue>(thread, handler), name)); in SetPrototype()
142 // 9. Let booleanTrapResult be ToBoolean(Call(trap, handler, «target, V»)). in SetPrototype()
175 // 1. Let handler be the value of the [[ProxyHandler]] internal slot of O. in IsExtensible()
176 JSTaggedValue handler = proxy->GetHandler(); in IsExtensible() local
177 // 2. If handler is null, throw a TypeError exception. in IsExtensible()
178 if (handler.IsNull()) { in IsExtensible()
179 THROW_TYPE_ERROR_AND_RETURN(thread, "JSProxy::IsExtensible: handler is null", false); in IsExtensible()
181 // 3. Assert: Type(handler) is Object. in IsExtensible()
182 ASSERT(handler.IsECMAObject()); in IsExtensible()
185 // 5. Let trap be GetMethod(handler, "isExtensible"). in IsExtensible()
187 …e<JSTaggedValue> trap(JSObject::GetMethod(thread, JSHandle<JSTaggedValue>(thread, handler), name)); in IsExtensible()
195 // 8. Let booleanTrapResult be ToBoolean(Call(trap, handler, «target»)). in IsExtensible()
224 // 1. Let handler be the value of the [[ProxyHandler]] internal slot of O. in PreventExtensions()
225 // 2. If handler is null, throw a TypeError exception. in PreventExtensions()
226 // 3. Assert: Type(handler) is Object. in PreventExtensions()
228 // 5. Let trap be GetMethod(handler, "preventExtensions"). in PreventExtensions()
232 // 8. Let booleanTrapResult be ToBoolean(Call(trap, handler, «target»)). in PreventExtensions()
234 JSTaggedValue handler = proxy->GetHandler(); in PreventExtensions() local
235 if (handler.IsNull()) { in PreventExtensions()
236 THROW_TYPE_ERROR_AND_RETURN(thread, "JSProxy::PreventExtensions: handler is null", false); in PreventExtensions()
238 ASSERT(handler.IsECMAObject()); in PreventExtensions()
241 …e<JSTaggedValue> trap(JSObject::GetMethod(thread, JSHandle<JSTaggedValue>(thread, handler), name)); in PreventExtensions()
277 // 2. Let handler be the value of the [[ProxyHandler]] internal slot of O. in GetOwnProperty()
278 // 3. If handler is null, throw a TypeError exception. in GetOwnProperty()
279 // 4. Assert: Type(handler) is Object. in GetOwnProperty()
281 // 6. Let trap be GetMethod(handler, "getOwnPropertyDescriptor"). in GetOwnProperty()
285 // 9. Let trapResultObj be Call(trap, handler, «target, P»). in GetOwnProperty()
288 JSTaggedValue handler = proxy->GetHandler(); in GetOwnProperty() local
289 if (handler.IsNull()) { in GetOwnProperty()
290 THROW_TYPE_ERROR_AND_RETURN(thread, "JSProxy::GetOwnProperty: handler is null", false); in GetOwnProperty()
292 ASSERT(handler.IsECMAObject()); in GetOwnProperty()
295 …e<JSTaggedValue> trap(JSObject::GetMethod(thread, JSHandle<JSTaggedValue>(thread, handler), name)); in GetOwnProperty()
381 JSTaggedValue handler = proxy->GetHandler(); in DefineOwnProperty() local
382 if (handler.IsNull()) { in DefineOwnProperty()
383 THROW_TYPE_ERROR_AND_RETURN(thread, "JSProxy::DefineOwnProperty: handler is Null", false); in DefineOwnProperty()
385 ASSERT(handler.IsECMAObject()); in DefineOwnProperty()
388 …e<JSTaggedValue> trap(JSObject::GetMethod(thread, JSHandle<JSTaggedValue>(thread, handler), name)); in DefineOwnProperty()
464 JSTaggedValue handler = proxy->GetHandler(); in HasProperty() local
465 if (handler.IsNull()) { in HasProperty()
466 THROW_TYPE_ERROR_AND_RETURN(thread, "JSProxy::HasProperty: handler is Null", false); in HasProperty()
468 ASSERT(handler.IsECMAObject()); in HasProperty()
471 …e<JSTaggedValue> trap(JSObject::GetMethod(thread, JSHandle<JSTaggedValue>(thread, handler), name)); in HasProperty()
478 // 9. Let booleanTrapResult be ToBoolean(Call(trap, handler, «target, P»)). in HasProperty()
524 JSTaggedValue handler = proxy->GetHandler(); in GetProperty() local
526 if (handler.IsNull()) { in GetProperty()
527 THROW_TYPE_ERROR_AND_RETURN(thread, "JSProxy::GetProperty: handler is Null", in GetProperty()
530 ASSERT(handler.IsECMAObject()); in GetProperty()
533 …e<JSTaggedValue> trap(JSObject::GetMethod(thread, JSHandle<JSTaggedValue>(thread, handler), name)); in GetProperty()
541 // 9. Let trapResult be Call(trap, handler, «target, P, Receiver»). in GetProperty()
599 JSTaggedValue handler = proxy->GetHandler(); in SetProperty() local
600 if (handler.IsNull()) { in SetProperty()
601 THROW_TYPE_ERROR_AND_RETURN(thread, "JSProxy::SetProperty: handler is Null", false); in SetProperty()
603 ASSERT(handler.IsECMAObject()); in SetProperty()
606 …e<JSTaggedValue> trap(JSObject::GetMethod(thread, JSHandle<JSTaggedValue>(thread, handler), name)); in SetProperty()
613 // 9. Let booleanTrapResult be ToBoolean(Call(trap, handler, «target, P, V, Receiver»)) in SetProperty()
662 JSTaggedValue handler = proxy->GetHandler(); in DeleteProperty() local
663 if (handler.IsNull()) { in DeleteProperty()
664 THROW_TYPE_ERROR_AND_RETURN(thread, "JSProxy::DeleteProperty: handler is Null", false); in DeleteProperty()
666 ASSERT(handler.IsECMAObject()); in DeleteProperty()
669 …e<JSTaggedValue> trap(JSObject::GetMethod(thread, JSHandle<JSTaggedValue>(thread, handler), name)); in DeleteProperty()
676 // 9. Let booleanTrapResult be ToBoolean(Call(trap, handler, «target, P»)). in DeleteProperty()
716 JSTaggedValue handler = proxy->GetHandler(); in OwnPropertyKeys() local
717 if (handler.IsNull()) { in OwnPropertyKeys()
718 THROW_TYPE_ERROR_AND_RETURN(thread, "OwnPropertyKeys: handler is null", in OwnPropertyKeys()
722 ASSERT(handler.IsECMAObject()); in OwnPropertyKeys()
725 // 5.Let trap be GetMethod(handler, "ownKeys"). in OwnPropertyKeys()
727 JSHandle<JSTaggedValue> handlerHandle(thread, handler); in OwnPropertyKeys()
739 // 8.Let trapResultArray be Call(trap, handler, «target»). in OwnPropertyKeys()
862 JSTaggedValue handler = proxy->GetHandler(); in GetAllPropertyKeys() local
863 if (handler.IsNull()) { in GetAllPropertyKeys()
864 THROW_TYPE_ERROR_AND_RETURN(thread, "OwnPropertyKeys: handler is null", in GetAllPropertyKeys()
868 ASSERT(handler.IsECMAObject()); in GetAllPropertyKeys()
872 JSHandle<JSTaggedValue> handlerHandle(thread, handler); in GetAllPropertyKeys()
935 JSHandle<JSTaggedValue> handler(thread, proxy->GetHandler()); in CallInternal() local
936 if (handler->IsNull()) { in CallInternal()
937 THROW_TYPE_ERROR_AND_RETURN(thread, "Call: handler is null", JSTaggedValue::Exception()); in CallInternal()
939 ASSERT(handler->IsECMAObject()); in CallInternal()
942 // 5.Let trap be GetMethod(handler, "apply"). in CallInternal()
944 JSHandle<JSTaggedValue> method = JSObject::GetMethod(thread, handler, key); in CallInternal()
968 // 9.Return Call(trap, handler, «target, thisArgument, argArray»). in CallInternal()
971 EcmaInterpreter::NewRuntimeCallInfo(thread, method, handler, undefined, argsLength); in CallInternal()
992 JSHandle<JSTaggedValue> handler(thread, proxy->GetHandler()); in ConstructInternal() local
993 if (handler->IsNull()) { in ConstructInternal()
994 … THROW_TYPE_ERROR_AND_RETURN(thread, "Constructor: handler is null", JSTaggedValue::Exception()); in ConstructInternal()
996 ASSERT(handler->IsECMAObject()); in ConstructInternal()
999 // 5.Let trap be GetMethod(handler, "construct"). in ConstructInternal()
1001 JSHandle<JSTaggedValue> method = JSObject::GetMethod(thread, handler, key); in ConstructInternal()
1026 // step 8 ~ 9 Call(trap, handler, «target, argArray, newTarget »). in ConstructInternal()
1037 EcmaInterpreter::NewRuntimeCallInfo(thread, method, handler, undefined, argsLength); in ConstructInternal()
1059 THROW_TYPE_ERROR_AND_RETURN(thread, "JSProxy::IsArray: handler is null", false); in IsArray()