Reflecting arguments in Call must happen irrespective of JSRESOLVE_ASSIGNING (396584, r=igor).
authorbrendan@mozilla.org
Tue, 11 Dec 2007 13:40:51 -0800
changeset 8921 24ba6b94323aaeeda6790caf57040933036c7d2b
parent 8920 55885049b4073d70ae78e55931725fb92aa55901
child 8922 0355856ad7d6f43968e9e6c557088edab98c8d27
push id1
push userbsmedberg@mozilla.com
push dateThu, 20 Mar 2008 16:49:24 +0000
treeherderautoland@61007906a1f8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersigor
bugs396584
milestone1.9b2pre
Reflecting arguments in Call must happen irrespective of JSRESOLVE_ASSIGNING (396584, r=igor).
js/src/jsfun.c
--- a/js/src/jsfun.c
+++ b/js/src/jsfun.c
@@ -854,33 +854,31 @@ call_resolve(JSContext *cx, JSObject *ob
                                      getter, setter, attrs,
                                      SPROP_HAS_SHORTID, (int) slot, NULL)) {
             return JS_FALSE;
         }
         *objp = obj;
         return JS_TRUE;
     }
 
-    if (!(flags & JSRESOLVE_ASSIGNING)) {
-        /*
-         * Resolve arguments so that we never store a particular Call object's
-         * arguments object reference in a Call prototype's |arguments| slot.
-         */
-        atom = cx->runtime->atomState.argumentsAtom;
-        if (id == ATOM_KEY(atom)) {
-            if (!js_DefineNativeProperty(cx, obj,
-                                         ATOM_TO_JSID(atom), JSVAL_VOID,
-                                         NULL, NULL, JSPROP_PERMANENT,
-                                         SPROP_HAS_SHORTID, CALL_ARGUMENTS,
-                                         NULL)) {
-                return JS_FALSE;
-            }
-            *objp = obj;
-            return JS_TRUE;
+    /*
+     * Resolve arguments so that we never store a particular Call object's
+     * arguments object reference in a Call prototype's |arguments| slot.
+     */
+    atom = cx->runtime->atomState.argumentsAtom;
+    if (id == ATOM_KEY(atom)) {
+        if (!js_DefineNativeProperty(cx, obj,
+                                     ATOM_TO_JSID(atom), JSVAL_VOID,
+                                     NULL, NULL, JSPROP_PERMANENT,
+                                     SPROP_HAS_SHORTID, CALL_ARGUMENTS,
+                                     NULL)) {
+            return JS_FALSE;
         }
+        *objp = obj;
+        return JS_TRUE;
     }
     return JS_TRUE;
 }
 
 static JSBool
 call_convert(JSContext *cx, JSObject *obj, JSType type, jsval *vp)
 {
     JSStackFrame *fp;