Fix bustage from checkin for bug Bug 479566
authorBlake Kaplan <mrbkap@gmail.com>
Sat, 21 Feb 2009 14:25:43 -0800
changeset 25476 a7d59e4a7b192dedc0ffbd22de1fea072368aa13
parent 25475 91822404cf911b829a20f1a7cfc4dba265c212a0
child 25477 c8a855f68fd4be9fc6c71cf8eefe02730faccc5d
push id5575
push userrsayre@mozilla.com
push dateWed, 25 Feb 2009 09:05:38 +0000
treeherdermozilla-central@8eba35e62d92 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs479566
milestone1.9.2a1pre
Fix bustage from checkin for bug Bug 479566
js/src/jsarray.cpp
--- a/js/src/jsarray.cpp
+++ b/js/src/jsarray.cpp
@@ -1188,20 +1188,22 @@ js_MakeArraySlow(JSContext *cx, JSObject
     }
 
     /*
      * Render our formerly-reserved count property GC-safe. If length fits in
      * a jsval, set our slow/sparse COUNT to the current length as a jsval, so
      * we can tell when only named properties have been added to a dense array
      * to make it slow-but-not-sparse.
      */
-    uint32 length = obj->fslots[JSSLOT_ARRAY_LENGTH];
-    obj->fslots[JSSLOT_ARRAY_COUNT] = INT_FITS_IN_JSVAL(length)
-                                      ? INT_TO_JSVAL(length)
-                                      : JSVAL_VOID;
+    {
+        uint32 length = obj->fslots[JSSLOT_ARRAY_LENGTH];
+        obj->fslots[JSSLOT_ARRAY_COUNT] = INT_FITS_IN_JSVAL(length)
+                                          ? INT_TO_JSVAL(length)
+                                          : JSVAL_VOID;
+    }
 
     /* Make sure we preserve any flags borrowing bits in classword. */
     obj->classword ^= (jsuword) &js_ArrayClass;
     obj->classword |= (jsuword) &js_SlowArrayClass;
 
     /* Swap in our new map. */
     oldmap = obj->map;
     obj->map = map;