Bug 975589, part 1 - Rename js::DefineConstructorAndPrototype -> GlobalObject::initBuiltinConstructor and refactor it a bit. r=jwalden.
This commit is contained in:
@@ -2481,13 +2481,13 @@ ClearClassObject(JSObject *obj, JSProtoKey key)
|
||||
obj->as<GlobalObject>().setPrototype(key, UndefinedValue());
|
||||
}
|
||||
|
||||
JSObject *
|
||||
js::DefineConstructorAndPrototype(JSContext *cx, HandleObject obj, JSProtoKey key, HandleAtom atom,
|
||||
JSObject *protoProto, const Class *clasp,
|
||||
Native constructor, unsigned nargs,
|
||||
const JSPropertySpec *ps, const JSFunctionSpec *fs,
|
||||
const JSPropertySpec *static_ps, const JSFunctionSpec *static_fs,
|
||||
JSObject **ctorp, AllocKind ctorKind)
|
||||
static JSObject *
|
||||
DefineConstructorAndPrototype(JSContext *cx, HandleObject obj, JSProtoKey key, HandleAtom atom,
|
||||
JSObject *protoProto, const Class *clasp,
|
||||
Native constructor, unsigned nargs,
|
||||
const JSPropertySpec *ps, const JSFunctionSpec *fs,
|
||||
const JSPropertySpec *static_ps, const JSFunctionSpec *static_fs,
|
||||
JSObject **ctorp, AllocKind ctorKind)
|
||||
{
|
||||
/*
|
||||
* Create a prototype object for this class.
|
||||
|
||||
Reference in New Issue
Block a user