JSCLASS_FIXED_BINDING only on Namespace, for better backward and forward compat (407323, r=jwalden).

This commit is contained in:
brendan%mozilla.org 2007-12-09 06:14:26 +00:00
Родитель 575eed8286
Коммит e5a3d46875
1 изменённых файлов: 3 добавлений и 5 удалений

Просмотреть файл

@ -446,8 +446,7 @@ qname_equality(JSContext *cx, JSObject *obj, jsval v, JSBool *bp)
JS_FRIEND_DATA(JSExtendedClass) js_QNameClass = {
{ "QName",
JSCLASS_HAS_PRIVATE | JSCLASS_CONSTRUCT_PROTOTYPE | JSCLASS_IS_EXTENDED |
JSCLASS_MARK_IS_TRACE | JSCLASS_HAS_CACHED_PROTO(JSProto_QName) |
JSCLASS_FIXED_BINDING,
JSCLASS_MARK_IS_TRACE | JSCLASS_HAS_CACHED_PROTO(JSProto_QName),
JS_PropertyStub, JS_PropertyStub, qname_getProperty, NULL,
JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, qname_finalize,
NULL, NULL, NULL, NULL,
@ -5561,7 +5560,7 @@ xml_getObjectOps(JSContext *cx, JSClass *clasp)
JS_FRIEND_DATA(JSClass) js_XMLClass = {
js_XML_str,
JSCLASS_HAS_PRIVATE | JSCLASS_MARK_IS_TRACE |
JSCLASS_HAS_CACHED_PROTO(JSProto_XML) | JSCLASS_FIXED_BINDING,
JSCLASS_HAS_CACHED_PROTO(JSProto_XML),
JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_PropertyStub,
JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, xml_finalize,
xml_getObjectOps, NULL, NULL, NULL,
@ -7678,8 +7677,7 @@ js_InitXMLClass(JSContext *cx, JSObject *obj)
return NULL;
/* Define the XMLList function and give it the same prototype as XML. */
fun = JS_DefineFunction(cx, obj, js_XMLList_str, XMLList, 1,
JSPROP_READONLY | JSPROP_PERMANENT);
fun = JS_DefineFunction(cx, obj, js_XMLList_str, XMLList, 1, 0);
if (!fun)
return NULL;
if (!js_SetClassPrototype(cx, fun->object, proto,