Lines Matching refs:handler

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