• Home
  • Raw
  • Download

Lines Matching full:handler

26 // ES6 9.5.15 ProxyCreate(target, handler)
28 const JSHandle<JSTaggedValue> &handler) in ProxyCreate() argument
36 // 2. If Type(handler) is not Object, throw a TypeError exception. in ProxyCreate()
37 if (!handler->IsECMAObject()) { in ProxyCreate()
38 THROW_TYPE_ERROR_AND_RETURN(thread, "ProxyCreate: handler is not Object", in ProxyCreate()
45 // 9. Set the [[ProxyHandler]] internal slot of P to handler. in ProxyCreate()
46 return thread->GetEcmaVM()->GetFactory()->NewJSProxy(target, handler); in ProxyCreate()
53 // 1. Let handler be the value of the [[ProxyHandler]] internal slot of O. in GetPrototype()
54 JSHandle<JSTaggedValue> handler(thread, proxy->GetHandler()); in GetPrototype() local
55 // 2. If handler is null, throw a TypeError exception. in GetPrototype()
56 if (handler->IsNull()) { in GetPrototype()
57 …THROW_TYPE_ERROR_AND_RETURN(thread, "JSProxy::GetPrototype: handler is null", JSTaggedValue::Excep… in GetPrototype()
59 // 3. Assert: Type(handler) is Object. in GetPrototype()
60 ASSERT(handler->IsECMAObject()); in GetPrototype()
63 // 5. Let trap be GetMethod(handler, "getPrototypeOf"). in GetPrototype()
65 JSHandle<JSTaggedValue> trap = JSObject::GetMethod(thread, handler, name); in GetPrototype()
73 // 8. Let handlerProto be Call(trap, handler, «target»). in GetPrototype()
75 …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()
174 // 1. Let handler be the value of the [[ProxyHandler]] internal slot of O. in IsExtensible()
175 JSTaggedValue handler = proxy->GetHandler(); in IsExtensible() local
176 // 2. If handler is null, throw a TypeError exception. in IsExtensible()
177 if (handler.IsNull()) { in IsExtensible()
178 THROW_TYPE_ERROR_AND_RETURN(thread, "JSProxy::IsExtensible: handler is null", false); in IsExtensible()
180 // 3. Assert: Type(handler) is Object. in IsExtensible()
181 ASSERT(handler.IsECMAObject()); in IsExtensible()
184 // 5. Let trap be GetMethod(handler, "isExtensible"). in IsExtensible()
186 …e<JSTaggedValue> trap(JSObject::GetMethod(thread, JSHandle<JSTaggedValue>(thread, handler), name)); in IsExtensible()
194 // 8. Let booleanTrapResult be ToBoolean(Call(trap, handler, «target»)). in IsExtensible()
222 // 1. Let handler be the value of the [[ProxyHandler]] internal slot of O. in PreventExtensions()
223 // 2. If handler is null, throw a TypeError exception. in PreventExtensions()
224 // 3. Assert: Type(handler) is Object. in PreventExtensions()
226 // 5. Let trap be GetMethod(handler, "preventExtensions"). in PreventExtensions()
230 // 8. Let booleanTrapResult be ToBoolean(Call(trap, handler, «target»)). in PreventExtensions()
232 JSTaggedValue handler = proxy->GetHandler(); in PreventExtensions() local
233 if (handler.IsNull()) { in PreventExtensions()
234 THROW_TYPE_ERROR_AND_RETURN(thread, "JSProxy::PreventExtensions: handler is null", false); in PreventExtensions()
236 ASSERT(handler.IsECMAObject()); in PreventExtensions()
239 …e<JSTaggedValue> trap(JSObject::GetMethod(thread, JSHandle<JSTaggedValue>(thread, handler), name)); in PreventExtensions()
274 // 2. Let handler be the value of the [[ProxyHandler]] internal slot of O. in GetOwnProperty()
275 // 3. If handler is null, throw a TypeError exception. in GetOwnProperty()
276 // 4. Assert: Type(handler) is Object. in GetOwnProperty()
278 // 6. Let trap be GetMethod(handler, "getOwnPropertyDescriptor"). in GetOwnProperty()
282 // 9. Let trapResultObj be Call(trap, handler, «target, P»). in GetOwnProperty()
285 JSTaggedValue handler = proxy->GetHandler(); in GetOwnProperty() local
286 if (handler.IsNull()) { in GetOwnProperty()
287 THROW_TYPE_ERROR_AND_RETURN(thread, "JSProxy::GetOwnProperty: handler is null", false); in GetOwnProperty()
289 ASSERT(handler.IsECMAObject()); in GetOwnProperty()
292 …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()
469 JSTaggedValue handler = proxy->GetHandler(); in HasProperty() local
470 if (handler.IsNull()) { in HasProperty()
471 THROW_TYPE_ERROR_AND_RETURN(thread, "JSProxy::HasProperty: handler is Null", false); in HasProperty()
473 ASSERT(handler.IsECMAObject()); in HasProperty()
476 …e<JSTaggedValue> trap(JSObject::GetMethod(thread, JSHandle<JSTaggedValue>(thread, handler), name)); in HasProperty()
483 // 9. Let booleanTrapResult be ToBoolean(Call(trap, handler, «target, P»)). in HasProperty()
528 JSTaggedValue handler = proxy->GetHandler(); in GetProperty() local
530 if (handler.IsNull()) { in GetProperty()
531 THROW_TYPE_ERROR_AND_RETURN(thread, "JSProxy::GetProperty: handler is Null", in GetProperty()
534 ASSERT(handler.IsECMAObject()); in GetProperty()
537 …e<JSTaggedValue> trap(JSObject::GetMethod(thread, JSHandle<JSTaggedValue>(thread, handler), name)); in GetProperty()
545 // 9. Let trapResult be Call(trap, handler, «target, P, Receiver»). in GetProperty()
602 JSTaggedValue handler = proxy->GetHandler(); in SetProperty() local
603 if (handler.IsNull()) { in SetProperty()
604 THROW_TYPE_ERROR_AND_RETURN(thread, "JSProxy::SetProperty: handler is Null", false); in SetProperty()
606 ASSERT(handler.IsECMAObject()); in SetProperty()
609 …e<JSTaggedValue> trap(JSObject::GetMethod(thread, JSHandle<JSTaggedValue>(thread, handler), name)); in SetProperty()
616 // 9. Let booleanTrapResult be ToBoolean(Call(trap, handler, «target, P, V, Receiver»)) in SetProperty()
661 JSTaggedValue handler = proxy->GetHandler(); in DeleteProperty() local
662 if (handler.IsNull()) { in DeleteProperty()
663 THROW_TYPE_ERROR_AND_RETURN(thread, "JSProxy::DeleteProperty: handler is Null", false); in DeleteProperty()
665 ASSERT(handler.IsECMAObject()); in DeleteProperty()
668 …e<JSTaggedValue> trap(JSObject::GetMethod(thread, JSHandle<JSTaggedValue>(thread, handler), name)); in DeleteProperty()
675 // 9. Let booleanTrapResult be ToBoolean(Call(trap, handler, «target, P»)). in DeleteProperty()
717 JSTaggedValue handler = proxy->GetHandler(); in OwnPropertyKeys() local
718 if (handler.IsNull()) { in OwnPropertyKeys()
719 THROW_TYPE_ERROR_AND_RETURN(thread, "OwnPropertyKeys: handler is null", in OwnPropertyKeys()
723 ASSERT(handler.IsECMAObject()); in OwnPropertyKeys()
726 // 5.Let trap be GetMethod(handler, "ownKeys"). in OwnPropertyKeys()
728 JSHandle<JSTaggedValue> handlerHandle(thread, handler); in OwnPropertyKeys()
740 // 8.Let trapResultArray be Call(trap, handler, «target»). in OwnPropertyKeys()
870 JSHandle<JSTaggedValue> handler(thread, proxy->GetHandler()); in CallInternal() local
871 if (handler->IsNull()) { in CallInternal()
872 THROW_TYPE_ERROR_AND_RETURN(thread, "Call: handler is null", JSTaggedValue::Exception()); in CallInternal()
874 ASSERT(handler->IsECMAObject()); in CallInternal()
877 // 5.Let trap be GetMethod(handler, "apply"). in CallInternal()
879 JSHandle<JSTaggedValue> method = JSObject::GetMethod(thread, handler, key); in CallInternal()
903 // 9.Return Call(trap, handler, «target, thisArgument, argArray»). in CallInternal()
906 EcmaInterpreter::NewRuntimeCallInfo(thread, method, handler, undefined, argsLength); in CallInternal()
923 JSHandle<JSTaggedValue> handler(thread, proxy->GetHandler()); in ConstructInternal() local
924 if (handler->IsNull()) { in ConstructInternal()
925 … THROW_TYPE_ERROR_AND_RETURN(thread, "Constructor: handler is null", JSTaggedValue::Exception()); in ConstructInternal()
927 ASSERT(handler->IsECMAObject()); in ConstructInternal()
930 // 5.Let trap be GetMethod(handler, "construct"). in ConstructInternal()
932 JSHandle<JSTaggedValue> method = JSObject::GetMethod(thread, handler, key); in ConstructInternal()
954 // step 8 ~ 9 Call(trap, handler, «target, argArray, newTarget »). in ConstructInternal()
959 EcmaInterpreter::NewRuntimeCallInfo(thread, method, handler, undefined, argsLength); in ConstructInternal()