Lines Matching refs:cx

24 Reflect_defineProperty(JSContext* cx, unsigned argc, Value* vp)  in Reflect_defineProperty()  argument
29 RootedObject obj(cx, NonNullObject(cx, args.get(0))); in Reflect_defineProperty()
34 RootedValue propertyKey(cx, args.get(1)); in Reflect_defineProperty()
35 RootedId key(cx); in Reflect_defineProperty()
36 if (!ToPropertyKey(cx, propertyKey, &key)) in Reflect_defineProperty()
40 Rooted<PropertyDescriptor> desc(cx); in Reflect_defineProperty()
41 if (!ToPropertyDescriptor(cx, args.get(2), true, &desc)) in Reflect_defineProperty()
46 if (!DefineProperty(cx, obj, key, desc, result)) in Reflect_defineProperty()
54 Reflect_deleteProperty(JSContext* cx, unsigned argc, Value* vp) in Reflect_deleteProperty() argument
59 RootedObject target(cx, NonNullObject(cx, args.get(0))); in Reflect_deleteProperty()
64 RootedValue propertyKey(cx, args.get(1)); in Reflect_deleteProperty()
65 RootedId key(cx); in Reflect_deleteProperty()
66 if (!ToPropertyKey(cx, propertyKey, &key)) in Reflect_deleteProperty()
71 if (!DeleteProperty(cx, target, key, result)) in Reflect_deleteProperty()
79 Reflect_get(JSContext* cx, unsigned argc, Value* vp) in Reflect_get() argument
84 RootedObject obj(cx, NonNullObject(cx, args.get(0))); in Reflect_get()
89 RootedValue propertyKey(cx, args.get(1)); in Reflect_get()
90 RootedId key(cx); in Reflect_get()
91 if (!ToPropertyKey(cx, propertyKey, &key)) in Reflect_get()
95 RootedValue receiver(cx, args.length() > 2 ? args[2] : args.get(0)); in Reflect_get()
98 return GetProperty(cx, obj, receiver, key, args.rval()); in Reflect_get()
103 Reflect_getOwnPropertyDescriptor(JSContext* cx, unsigned argc, Value* vp) in Reflect_getOwnPropertyDescriptor() argument
107 if (!NonNullObject(cx, args.get(0))) in Reflect_getOwnPropertyDescriptor()
112 return js::obj_getOwnPropertyDescriptor(cx, argc, vp); in Reflect_getOwnPropertyDescriptor()
117 js::Reflect_getPrototypeOf(JSContext* cx, unsigned argc, Value* vp) in Reflect_getPrototypeOf() argument
122 RootedObject target(cx, NonNullObject(cx, args.get(0))); in Reflect_getPrototypeOf()
127 RootedObject proto(cx); in Reflect_getPrototypeOf()
128 if (!GetPrototype(cx, target, &proto)) in Reflect_getPrototypeOf()
136 js::Reflect_isExtensible(JSContext* cx, unsigned argc, Value* vp) in Reflect_isExtensible() argument
141 RootedObject target(cx, NonNullObject(cx, args.get(0))); in Reflect_isExtensible()
147 if (!IsExtensible(cx, target, &extensible)) in Reflect_isExtensible()
155 Reflect_ownKeys(JSContext* cx, unsigned argc, Value* vp) in Reflect_ownKeys() argument
160 if (!NonNullObject(cx, args.get(0))) in Reflect_ownKeys()
164 return GetOwnPropertyKeys(cx, args, JSITER_OWNONLY | JSITER_HIDDEN | JSITER_SYMBOLS); in Reflect_ownKeys()
169 Reflect_preventExtensions(JSContext* cx, unsigned argc, Value* vp) in Reflect_preventExtensions() argument
174 RootedObject target(cx, NonNullObject(cx, args.get(0))); in Reflect_preventExtensions()
180 if (!PreventExtensions(cx, target, result)) in Reflect_preventExtensions()
188 Reflect_set(JSContext* cx, unsigned argc, Value* vp) in Reflect_set() argument
193 RootedObject target(cx, NonNullObject(cx, args.get(0))); in Reflect_set()
198 RootedValue propertyKey(cx, args.get(1)); in Reflect_set()
199 RootedId key(cx); in Reflect_set()
200 if (!ToPropertyKey(cx, propertyKey, &key)) in Reflect_set()
204 RootedValue receiver(cx, args.length() > 3 ? args[3] : args.get(0)); in Reflect_set()
208 RootedValue value(cx, args.get(2)); in Reflect_set()
209 if (!SetProperty(cx, target, key, value, receiver, result)) in Reflect_set()
222 Reflect_setPrototypeOf(JSContext* cx, unsigned argc, Value* vp) in Reflect_setPrototypeOf() argument
227 RootedObject obj(cx, NonNullObject(cx, args.get(0))); in Reflect_setPrototypeOf()
233 JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_NOT_EXPECTED_TYPE, in Reflect_setPrototypeOf()
238 RootedObject proto(cx, args.get(1).toObjectOrNull()); in Reflect_setPrototypeOf()
242 if (!SetPrototype(cx, obj, proto, result)) in Reflect_setPrototypeOf()
269 js::InitReflect(JSContext* cx, HandleObject obj) in InitReflect() argument
271 RootedObject proto(cx, obj->as<GlobalObject>().getOrCreateObjectPrototype(cx)); in InitReflect()
275 RootedObject reflect(cx, NewObjectWithGivenProto<PlainObject>(cx, proto, SingletonObject)); in InitReflect()
278 if (!JS_DefineFunctions(cx, reflect, methods)) in InitReflect()
281 RootedValue value(cx, ObjectValue(*reflect)); in InitReflect()
282 if (!DefineProperty(cx, obj, cx->names().Reflect, value, nullptr, nullptr, JSPROP_RESOLVING)) in InitReflect()