Bug 523686 - Kill fun_enumerate, since it's no longer necessary now that bug 514603 is fixt. r=jorendorff
authorJeff Walden <jwalden@mit.edu>
Wed, 21 Oct 2009 15:00:51 -0700
changeset 34318 240dc0b2b41f72f033d968b140f6a78106165b2e
parent 34317 64094cb2f8b22cfffc38cd5a8795214d1e2e5a42
child 34319 f9a98365c212e98aa56c7eb2786073a15d77fcd0
push idunknown
push userunknown
push dateunknown
reviewersjorendorff
bugs523686, 514603
milestone1.9.3a1pre
Bug 523686 - Kill fun_enumerate, since it's no longer necessary now that bug 514603 is fixt. r=jorendorff
js/src/jsfun.cpp
--- a/js/src/jsfun.cpp
+++ b/js/src/jsfun.cpp
@@ -1379,31 +1379,16 @@ typedef struct LazyFunctionProp {
 static LazyFunctionProp lazy_function_props[] = {
     {ATOM_OFFSET(arguments), FUN_ARGUMENTS, JSPROP_PERMANENT},
     {ATOM_OFFSET(arity),     FUN_ARITY,      JSPROP_PERMANENT},
     {ATOM_OFFSET(caller),    FUN_CALLER,     JSPROP_PERMANENT},
     {ATOM_OFFSET(name),      FUN_NAME,       JSPROP_PERMANENT},
 };
 
 static JSBool
-fun_enumerate(JSContext *cx, JSObject *obj)
-{
-    jsid prototypeId;
-    JSObject *pobj;
-    JSProperty *prop;
-
-    prototypeId = ATOM_TO_JSID(cx->runtime->atomState.classPrototypeAtom);
-    if (js_LookupPropertyWithFlags(cx, obj, prototypeId, JSRESOLVE_QUALIFIED, &pobj, &prop) < 0)
-        return JS_FALSE;
-    if (prop)
-        pobj->dropProperty(cx, prop);
-    return JS_TRUE;
-}
-
-static JSBool
 fun_resolve(JSContext *cx, JSObject *obj, jsval id, uintN flags,
             JSObject **objp)
 {
     JSFunction *fun;
     JSAtom *atom;
     uintN i;
 
     if (!JSVAL_IS_STRING(id))
@@ -1820,17 +1805,17 @@ fun_reserveSlots(JSContext *cx, JSObject
  * and those on which ad-hoc properties are defined.
  */
 JS_FRIEND_DATA(JSClass) js_FunctionClass = {
     js_Function_str,
     JSCLASS_HAS_PRIVATE | JSCLASS_NEW_RESOLVE | JSCLASS_HAS_RESERVED_SLOTS(2) |
     JSCLASS_MARK_IS_TRACE | JSCLASS_HAS_CACHED_PROTO(JSProto_Function),
     JS_PropertyStub,  JS_PropertyStub,
     JS_PropertyStub,  JS_PropertyStub,
-    fun_enumerate,    (JSResolveOp)fun_resolve,
+    JS_EnumerateStub, (JSResolveOp)fun_resolve,
     fun_convert,      fun_finalize,
     NULL,             NULL,
     NULL,             NULL,
     js_XDRFunctionObject, fun_hasInstance,
     JS_CLASS_TRACE(fun_trace), fun_reserveSlots
 };
 
 static JSBool