mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 898263 (part 5) - Move some ClassExtension function typedefs out of jsprvtd.h. r=jorendorff.
--HG-- extra : rebase_source : 9899c4534052a4ba3f4bce78e4e0a84a7576d3bc
This commit is contained in:
parent
1399d1419a
commit
00e97bc998
@ -1362,7 +1362,7 @@ JS_InitStandardClasses(JSContext *cx, JSObject *objArg)
|
||||
#define EAGER_ATOM_AND_OCLASP(name) EAGER_CLASS_ATOM(name), OCLASP(name)
|
||||
|
||||
typedef struct JSStdName {
|
||||
JSClassInitializerOp init;
|
||||
ClassInitializerOp init;
|
||||
size_t atomOffset; /* offset of atom pointer in JSAtomState */
|
||||
Class *clasp;
|
||||
} JSStdName;
|
||||
|
@ -948,6 +948,20 @@ typedef void
|
||||
typedef void
|
||||
(* JSTraceNamePrinter)(JSTracer *trc, char *buf, size_t bufsize);
|
||||
|
||||
/*
|
||||
* A generic type for functions mapping an object to another object, or null
|
||||
* if an error or exception was thrown on cx.
|
||||
*/
|
||||
typedef JSObject *
|
||||
(* JSObjectOp)(JSContext *cx, JS::Handle<JSObject*> obj);
|
||||
|
||||
/*
|
||||
* Hook that creates an iterator object for a given object. Returns the
|
||||
* iterator object or null if an error or exception was thrown on cx.
|
||||
*/
|
||||
typedef JSObject *
|
||||
(* JSIteratorOp)(JSContext *cx, JS::HandleObject obj, bool keysonly);
|
||||
|
||||
typedef JSObject *
|
||||
(* JSWeakmapKeyDelegateOp)(JSObject *obj);
|
||||
|
||||
|
@ -2980,7 +2980,7 @@ js_InitNullClass(JSContext *cx, HandleObject obj)
|
||||
JS_FOR_EACH_PROTOTYPE(DECLARE_PROTOTYPE_CLASS_INIT)
|
||||
#undef DECLARE_PROTOTYPE_CLASS_INIT
|
||||
|
||||
static JSClassInitializerOp lazy_prototype_init[JSProto_LIMIT] = {
|
||||
static ClassInitializerOp lazy_prototype_init[JSProto_LIMIT] = {
|
||||
#define LAZY_PROTOTYPE_INIT(name,code,init) init,
|
||||
JS_FOR_EACH_PROTOTYPE(LAZY_PROTOTYPE_INIT)
|
||||
#undef LAZY_PROTOTYPE_INIT
|
||||
@ -3104,7 +3104,7 @@ js_GetClassObject(ExclusiveContext *cxArg, JSObject *obj, JSProtoKey key, Mutabl
|
||||
}
|
||||
|
||||
RootedObject cobj(cx, NULL);
|
||||
if (JSClassInitializerOp init = lazy_prototype_init[key]) {
|
||||
if (ClassInitializerOp init = lazy_prototype_init[key]) {
|
||||
if (!init(cx, global))
|
||||
return false;
|
||||
v = global->getReservedSlot(key);
|
||||
|
@ -1107,6 +1107,8 @@ IsStandardClassResolved(JSObject *obj, js::Class *clasp);
|
||||
void
|
||||
MarkStandardClassInitializedNoProto(JSObject *obj, js::Class *clasp);
|
||||
|
||||
typedef JSObject *(*ClassInitializerOp)(JSContext *cx, JS::HandleObject obj);
|
||||
|
||||
} /* namespace js */
|
||||
|
||||
/*
|
||||
|
@ -66,25 +66,4 @@ struct IdValuePair
|
||||
|
||||
} /* namespace js */
|
||||
|
||||
/* js::ObjectOps function pointer typedefs. */
|
||||
|
||||
/*
|
||||
* A generic type for functions mapping an object to another object, or null
|
||||
* if an error or exception was thrown on cx.
|
||||
*/
|
||||
typedef JSObject *
|
||||
(* JSObjectOp)(JSContext *cx, JS::Handle<JSObject*> obj);
|
||||
|
||||
/* Signature for class initialization ops. */
|
||||
typedef JSObject *
|
||||
(* JSClassInitializerOp)(JSContext *cx, JS::HandleObject obj);
|
||||
|
||||
/*
|
||||
* Hook that creates an iterator object for a given object. Returns the
|
||||
* iterator object or null if an error or exception was thrown on cx.
|
||||
*/
|
||||
typedef JSObject *
|
||||
(* JSIteratorOp)(JSContext *cx, JS::HandleObject obj, bool keysonly);
|
||||
|
||||
|
||||
#endif /* jsprvtd_h */
|
||||
|
Loading…
Reference in New Issue
Block a user