• 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(thread)); 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(thread); 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(thread); 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(thread); 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(thread); 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(thread); 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(thread); 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()
565 JSTaggedValue handler = proxy->GetHandler(thread); in GetProperty() local
567 if (handler.IsNull()) { in GetProperty()
568 THROW_TYPE_ERROR_AND_RETURN(thread, "JSProxy::GetProperty: handler is Null", in GetProperty()
571 ASSERT(handler.IsECMAObject()); in GetProperty()
574 …TaggedValue> trap(JSObject::FastGetMethod(thread, JSHandle<JSTaggedValue>(thread, handler), name)); in GetProperty()
582 // 9. Let trapResult be Call(trap, handler, «target, P, Receiver»). in GetProperty()
635 JSTaggedValue handler = proxy->GetHandler(thread); in SetProperty() local
636 if (handler.IsNull()) { in SetProperty()
637 THROW_TYPE_ERROR_AND_RETURN(thread, "JSProxy::SetProperty: handler is Null", false); in SetProperty()
639 ASSERT(handler.IsECMAObject()); in SetProperty()
642 …TaggedValue> trap(JSObject::FastGetMethod(thread, JSHandle<JSTaggedValue>(thread, handler), name)); in SetProperty()
649 // 9. Let booleanTrapResult be ToBoolean(Call(trap, handler, «target, P, V, Receiver»)) in SetProperty()
678 JSTaggedValue handler = proxy->GetHandler(thread); in DeleteProperty() local
679 if (handler.IsNull()) { in DeleteProperty()
680 THROW_TYPE_ERROR_AND_RETURN(thread, "JSProxy::DeleteProperty: handler is Null", false); in DeleteProperty()
682 ASSERT(handler.IsECMAObject()); in DeleteProperty()
685 …e<JSTaggedValue> trap(JSObject::GetMethod(thread, JSHandle<JSTaggedValue>(thread, handler), name)); in DeleteProperty()
692 // 9. Let booleanTrapResult be ToBoolean(Call(trap, handler, «target, P»)). in DeleteProperty()
732 JSTaggedValue handler = proxy->GetHandler(thread); in OwnPropertyKeys() local
733 if (handler.IsNull()) { in OwnPropertyKeys()
734 THROW_TYPE_ERROR_AND_RETURN(thread, "OwnPropertyKeys: handler is null", in OwnPropertyKeys()
738 ASSERT(handler.IsECMAObject()); in OwnPropertyKeys()
741 // 5.Let trap be GetMethod(handler, "ownKeys"). in OwnPropertyKeys()
743 JSHandle<JSTaggedValue> handlerHandle(thread, handler); in OwnPropertyKeys()
755 // 8.Let trapResultArray be Call(trap, handler, «target»). in OwnPropertyKeys()
878 JSTaggedValue handler = proxy->GetHandler(thread); in GetAllPropertyKeys() local
879 if (handler.IsNull()) { in GetAllPropertyKeys()
880 THROW_TYPE_ERROR_AND_RETURN(thread, "OwnPropertyKeys: handler is null", in GetAllPropertyKeys()
884 ASSERT(handler.IsECMAObject()); in GetAllPropertyKeys()
888 JSHandle<JSTaggedValue> handlerHandle(thread, handler); in GetAllPropertyKeys()
951 JSHandle<JSTaggedValue> handler(thread, proxy->GetHandler(thread)); in CallInternal() local
952 if (handler->IsNull()) { in CallInternal()
953 THROW_TYPE_ERROR_AND_RETURN(thread, "Call: handler is null", JSTaggedValue::Exception()); in CallInternal()
955 ASSERT(handler->IsECMAObject()); in CallInternal()
958 // 5.Let trap be GetMethod(handler, "apply"). in CallInternal()
960 JSHandle<JSTaggedValue> method = JSObject::GetMethod(thread, handler, key); in CallInternal()
984 // 9.Return Call(trap, handler, «target, thisArgument, argArray»). in CallInternal()
987 EcmaInterpreter::NewRuntimeCallInfo(thread, method, handler, undefined, argsLength); in CallInternal()
1008 JSHandle<JSTaggedValue> handler(thread, proxy->GetHandler(thread)); in ConstructInternal() local
1009 if (handler->IsNull()) { in ConstructInternal()
1010 … THROW_TYPE_ERROR_AND_RETURN(thread, "Constructor: handler is null", JSTaggedValue::Exception()); in ConstructInternal()
1012 ASSERT(handler->IsECMAObject()); in ConstructInternal()
1015 // 5.Let trap be GetMethod(handler, "construct"). in ConstructInternal()
1017 JSHandle<JSTaggedValue> method = JSObject::GetMethod(thread, handler, key); in ConstructInternal()
1042 // step 8 ~ 9 Call(trap, handler, «target, argArray, newTarget »). in ConstructInternal()
1053 EcmaInterpreter::NewRuntimeCallInfo(thread, method, handler, undefined, argsLength); in ConstructInternal()
1075 THROW_TYPE_ERROR_AND_RETURN(thread, "JSProxy::IsArray: handler is null", false); in IsArray()