зеркало из https://github.com/mozilla/pjs.git
Bug 416636 - Remove JSCLASS_FIXED_BINDING; the code that was to use it was removed, and it just clutters the API. r=brendan, a=schrep
This commit is contained in:
Родитель
bf6953c9c1
Коммит
cddc8182e7
|
@ -2720,9 +2720,7 @@ JS_InitClass(JSContext *cx, JSObject *obj, JSObject *parent_proto,
|
|||
named = OBJ_DEFINE_PROPERTY(cx, obj, ATOM_TO_JSID(atom),
|
||||
OBJECT_TO_JSVAL(proto),
|
||||
NULL, NULL,
|
||||
(clasp->flags &
|
||||
(JSCLASS_IS_ANONYMOUS |
|
||||
JSCLASS_FIXED_BINDING))
|
||||
(clasp->flags & JSCLASS_IS_ANONYMOUS)
|
||||
? JSPROP_READONLY | JSPROP_PERMANENT
|
||||
: 0,
|
||||
NULL);
|
||||
|
@ -2733,10 +2731,7 @@ JS_InitClass(JSContext *cx, JSObject *obj, JSObject *parent_proto,
|
|||
ctor = proto;
|
||||
} else {
|
||||
/* Define the constructor function in obj's scope. */
|
||||
fun = js_DefineFunction(cx, obj, atom, constructor, nargs,
|
||||
(clasp->flags & JSCLASS_FIXED_BINDING)
|
||||
? JSPROP_READONLY | JSPROP_PERMANENT
|
||||
: 0);
|
||||
fun = js_DefineFunction(cx, obj, atom, constructor, nargs, 0);
|
||||
named = (fun != NULL);
|
||||
if (!fun)
|
||||
goto bad;
|
||||
|
|
|
@ -1281,12 +1281,6 @@ struct JSExtendedClass {
|
|||
/* Indicates that JSClass.mark is a tracer with JSTraceOp type. */
|
||||
#define JSCLASS_MARK_IS_TRACE (1<<(JSCLASS_HIGH_FLAGS_SHIFT+3))
|
||||
|
||||
/*
|
||||
* Indicates that the class object defined on the object provided to
|
||||
* JS_InitClass should be readonly and permanent.
|
||||
*/
|
||||
#define JSCLASS_FIXED_BINDING (1<<(JSCLASS_HIGH_FLAGS_SHIFT+4))
|
||||
|
||||
/*
|
||||
* ECMA-262 requires that most constructors used internally create objects
|
||||
* with "the original Foo.prototype value" as their [[Prototype]] (__proto__)
|
||||
|
|
Загрузка…
Ссылка в новой задаче