Bug 975589, part 1 - Rename js::DefineConstructorAndPrototype -> GlobalObject::initBuiltinConstructor and refactor it a bit. r=jwalden.

This commit is contained in:
Jason Orendorff
2014-03-10 16:29:40 -05:00
parent b84c508dc5
commit 1f7f9f3949
15 changed files with 58 additions and 63 deletions

View File

@@ -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.