• Home
  • Raw
  • Download

Lines Matching full:handler

25 // ES6 9.5.15 ProxyCreate(target, handler)
27 const JSHandle<JSTaggedValue> &handler) in ProxyCreate() argument
35 // 2. If Type(handler) is not Object, throw a TypeError exception. in ProxyCreate()
36 if (!handler->IsECMAObject()) { in ProxyCreate()
37 THROW_TYPE_ERROR_AND_RETURN(thread, "ProxyCreate: handler is not Object", in ProxyCreate()
44 // 9. Set the [[ProxyHandler]] internal slot of P to handler. in ProxyCreate()
45 return thread->GetEcmaVM()->GetFactory()->NewJSProxy(target, handler); in ProxyCreate()
51 // 1. Let handler be the value of the [[ProxyHandler]] internal slot of O. in GetPrototype()
52 JSHandle<JSTaggedValue> handler(thread, proxy->GetHandler()); in GetPrototype() local
53 // 2. If handler is null, throw a TypeError exception. in GetPrototype()
54 if (handler->IsNull()) { in GetPrototype()
55 …THROW_TYPE_ERROR_AND_RETURN(thread, "JSProxy::GetPrototype: handler is null", JSTaggedValue::Excep… in GetPrototype()
57 // 3. Assert: Type(handler) is Object. in GetPrototype()
58 ASSERT(handler->IsECMAObject()); in GetPrototype()
61 // 5. Let trap be GetMethod(handler, "getPrototypeOf"). in GetPrototype()
63 JSHandle<JSTaggedValue> trap = JSObject::GetMethod(thread, handler, name); in GetPrototype()
71 // 8. Let handlerProto be Call(trap, handler, «target»). in GetPrototype()
74 JSTaggedValue handlerProto = JSFunction::Call(thread, trap, handler, 1, arguments->GetArgv()); in GetPrototype()
109 // 2. Let handler be the value of the [[ProxyHandler]] internal slot of O. in SetPrototype()
110 JSTaggedValue handler = proxy->GetHandler(); in SetPrototype() local
111 // 3. If handler is null, throw a TypeError exception. in SetPrototype()
112 if (handler.IsNull()) { in SetPrototype()
113 THROW_TYPE_ERROR_AND_RETURN(thread, "JSProxy::SetPrototype: handler is null", false); in SetPrototype()
115 // 4. Assert: Type(handler) is Object. in SetPrototype()
116 ASSERT(handler.IsECMAObject()); in SetPrototype()
119 // 6. Let trap be GetMethod(handler, "setPrototypeOf"). in SetPrototype()
121 …e<JSTaggedValue> trap(JSObject::GetMethod(thread, JSHandle<JSTaggedValue>(thread, handler), name)); in SetPrototype()
135 // 9. Let booleanTrapResult be ToBoolean(Call(trap, handler, «target, V»)). in SetPrototype()
166 // 1. Let handler be the value of the [[ProxyHandler]] internal slot of O. in IsExtensible()
167 JSTaggedValue handler = proxy->GetHandler(); in IsExtensible() local
168 // 2. If handler is null, throw a TypeError exception. in IsExtensible()
169 if (handler.IsNull()) { in IsExtensible()
170 THROW_TYPE_ERROR_AND_RETURN(thread, "JSProxy::IsExtensible: handler is null", false); in IsExtensible()
172 // 3. Assert: Type(handler) is Object. in IsExtensible()
173 ASSERT(handler.IsECMAObject()); in IsExtensible()
176 // 5. Let trap be GetMethod(handler, "isExtensible"). in IsExtensible()
178 …e<JSTaggedValue> trap(JSObject::GetMethod(thread, JSHandle<JSTaggedValue>(thread, handler), name)); in IsExtensible()
186 // 8. Let booleanTrapResult be ToBoolean(Call(trap, handler, «target»)). in IsExtensible()
211 // 1. Let handler be the value of the [[ProxyHandler]] internal slot of O. in PreventExtensions()
212 // 2. If handler is null, throw a TypeError exception. in PreventExtensions()
213 // 3. Assert: Type(handler) is Object. in PreventExtensions()
215 // 5. Let trap be GetMethod(handler, "preventExtensions"). in PreventExtensions()
219 // 8. Let booleanTrapResult be ToBoolean(Call(trap, handler, «target»)). in PreventExtensions()
221 JSTaggedValue handler = proxy->GetHandler(); in PreventExtensions() local
222 if (handler.IsNull()) { in PreventExtensions()
223 THROW_TYPE_ERROR_AND_RETURN(thread, "JSProxy::PreventExtensions: handler is null", false); in PreventExtensions()
225 ASSERT(handler.IsECMAObject()); in PreventExtensions()
228 …e<JSTaggedValue> trap(JSObject::GetMethod(thread, JSHandle<JSTaggedValue>(thread, handler), name)); in PreventExtensions()
260 // 2. Let handler be the value of the [[ProxyHandler]] internal slot of O. in GetOwnProperty()
261 // 3. If handler is null, throw a TypeError exception. in GetOwnProperty()
262 // 4. Assert: Type(handler) is Object. in GetOwnProperty()
264 // 6. Let trap be GetMethod(handler, "getOwnPropertyDescriptor"). in GetOwnProperty()
268 // 9. Let trapResultObj be Call(trap, handler, «target, P»). in GetOwnProperty()
271 JSTaggedValue handler = proxy->GetHandler(); in GetOwnProperty() local
272 if (handler.IsNull()) { in GetOwnProperty()
273 THROW_TYPE_ERROR_AND_RETURN(thread, "JSProxy::GetOwnProperty: handler is null", false); in GetOwnProperty()
275 ASSERT(handler.IsECMAObject()); in GetOwnProperty()
278 …e<JSTaggedValue> trap(JSObject::GetMethod(thread, JSHandle<JSTaggedValue>(thread, handler), name)); in GetOwnProperty()
364 JSTaggedValue handler = proxy->GetHandler(); in DefineOwnProperty() local
365 if (handler.IsNull()) { in DefineOwnProperty()
366 THROW_TYPE_ERROR_AND_RETURN(thread, "JSProxy::DefineOwnProperty: handler is Null", false); in DefineOwnProperty()
368 ASSERT(handler.IsECMAObject()); in DefineOwnProperty()
371 …e<JSTaggedValue> trap(JSObject::GetMethod(thread, JSHandle<JSTaggedValue>(thread, handler), name)); in DefineOwnProperty()
449 JSTaggedValue handler = proxy->GetHandler(); in HasProperty() local
450 if (handler.IsNull()) { in HasProperty()
451 THROW_TYPE_ERROR_AND_RETURN(thread, "JSProxy::HasProperty: handler is Null", false); in HasProperty()
453 ASSERT(handler.IsECMAObject()); in HasProperty()
456 …e<JSTaggedValue> trap(JSObject::GetMethod(thread, JSHandle<JSTaggedValue>(thread, handler), name)); in HasProperty()
463 // 9. Let booleanTrapResult be ToBoolean(Call(trap, handler, «target, P»)). in HasProperty()
505 JSTaggedValue handler = proxy->GetHandler(); in GetProperty() local
507 if (handler.IsNull()) { in GetProperty()
508 THROW_TYPE_ERROR_AND_RETURN(thread, "JSProxy::GetProperty: handler is Null", in GetProperty()
511 ASSERT(handler.IsECMAObject()); in GetProperty()
514 …e<JSTaggedValue> trap(JSObject::GetMethod(thread, JSHandle<JSTaggedValue>(thread, handler), name)); in GetProperty()
522 // 9. Let trapResult be Call(trap, handler, «target, P, Receiver»). in GetProperty()
575 JSTaggedValue handler = proxy->GetHandler(); in SetProperty() local
576 if (handler.IsNull()) { in SetProperty()
577 THROW_TYPE_ERROR_AND_RETURN(thread, "JSProxy::SetProperty: handler is Null", false); in SetProperty()
579 ASSERT(handler.IsECMAObject()); in SetProperty()
582 …e<JSTaggedValue> trap(JSObject::GetMethod(thread, JSHandle<JSTaggedValue>(thread, handler), name)); in SetProperty()
589 // 9. Let booleanTrapResult be ToBoolean(Call(trap, handler, «target, P, V, Receiver»)) in SetProperty()
630 JSTaggedValue handler = proxy->GetHandler(); in DeleteProperty() local
631 if (handler.IsNull()) { in DeleteProperty()
632 THROW_TYPE_ERROR_AND_RETURN(thread, "JSProxy::DeleteProperty: handler is Null", false); in DeleteProperty()
634 ASSERT(handler.IsECMAObject()); in DeleteProperty()
637 …e<JSTaggedValue> trap(JSObject::GetMethod(thread, JSHandle<JSTaggedValue>(thread, handler), name)); in DeleteProperty()
644 // 9. Let booleanTrapResult be ToBoolean(Call(trap, handler, «target, P»)). in DeleteProperty()
683 JSTaggedValue handler = proxy->GetHandler(); in OwnPropertyKeys() local
684 if (handler.IsNull()) { in OwnPropertyKeys()
685 THROW_TYPE_ERROR_AND_RETURN(thread, "OwnPropertyKeys: handler is null", in OwnPropertyKeys()
689 ASSERT(handler.IsECMAObject()); in OwnPropertyKeys()
692 // 5.Let trap be GetMethod(handler, "ownKeys"). in OwnPropertyKeys()
694 JSHandle<JSTaggedValue> handlerHandle(thread, handler); in OwnPropertyKeys()
706 // 8.Let trapResultArray be Call(trap, handler, «target»). in OwnPropertyKeys()
828 JSHandle<JSTaggedValue> handler(thread, proxy->GetHandler()); in CallInternal() local
829 if (handler->IsNull()) { in CallInternal()
830 THROW_TYPE_ERROR_AND_RETURN(thread, "Call: handler is null", JSTaggedValue::Exception()); in CallInternal()
832 ASSERT(handler->IsECMAObject()); in CallInternal()
835 // 5.Let trap be GetMethod(handler, "apply"). in CallInternal()
837 JSHandle<JSTaggedValue> method = JSObject::GetMethod(thread, handler, key); in CallInternal()
854 // 9.Return Call(trap, handler, «target, thisArgument, argArray»). in CallInternal()
857 …return JSFunction::Call(thread, method, handler, 3, proxyArgv->GetArgv()); // 3: «target, thisArg… in CallInternal()
865 JSHandle<JSTaggedValue> handler(thread, proxy->GetHandler()); in ConstructInternal() local
866 if (handler->IsNull()) { in ConstructInternal()
867 … THROW_TYPE_ERROR_AND_RETURN(thread, "Constructor: handler is null", JSTaggedValue::Exception()); in ConstructInternal()
869 ASSERT(handler->IsECMAObject()); in ConstructInternal()
872 // 5.Let trap be GetMethod(handler, "construct"). in ConstructInternal()
874 JSHandle<JSTaggedValue> method = JSObject::GetMethod(thread, handler, key); in ConstructInternal()
894 // step 8 ~ 9 Call(trap, handler, «target, argArray, newTarget »). in ConstructInternal()
898 …JSFunction::Call(thread, method, handler, 3, arguments->GetArgv()); // 3: «target, argArray, newT… in ConstructInternal()