Bug 1138499, part 0 - Fix code spuriously using JSPROP_READONLY when defining an accessor property. r=Waldo.
authorJason Orendorff <jorendorff@mozilla.com>
Mon, 23 Mar 2015 16:36:43 -0500
changeset 237280 725dbd169e90f0597e370217a1d45dd57f7e9d14
parent 237279 ce54231de5ac877c4f90817d1c6322cf10f6650e
child 237281 f9c99e8ce20747e7b233f475d2be424bcbad8399
push id57907
push userjorendorff@mozilla.com
push dateThu, 02 Apr 2015 15:02:59 +0000
treeherdermozilla-inbound@b3ef9fce0df5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersWaldo
bugs1138499
milestone40.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1138499, part 0 - Fix code spuriously using JSPROP_READONLY when defining an accessor property. r=Waldo.
js/src/jsgc.cpp
--- a/js/src/jsgc.cpp
+++ b/js/src/jsgc.cpp
@@ -7260,17 +7260,17 @@ NewMemoryInfoObject(JSContext* cx)
         { "gcIsHighFrequencyMode", GCHighFreqGetter },
         { "gcNumber", GCNumberGetter },
         { "majorGCCount", MajorGCCountGetter },
         { "minorGCCount", MinorGCCountGetter }
     };
 
     for (size_t i = 0; i < mozilla::ArrayLength(getters); i++) {
         if (!JS_DefineProperty(cx, obj, getters[i].name, UndefinedHandleValue,
-                               JSPROP_READONLY | JSPROP_SHARED | JSPROP_ENUMERATE,
+                               JSPROP_ENUMERATE | JSPROP_SHARED,
                                getters[i].getter, nullptr))
         {
             return nullptr;
         }
     }
 
     RootedObject zoneObj(cx, JS_NewObject(cx, nullptr));
     if (!zoneObj)
@@ -7290,17 +7290,17 @@ NewMemoryInfoObject(JSContext* cx)
         { "maxMalloc", ZoneMaxMallocGetter },
         { "delayBytes", ZoneGCDelayBytesGetter },
         { "heapGrowthFactor", ZoneGCHeapGrowthFactorGetter },
         { "gcNumber", ZoneGCNumberGetter }
     };
 
     for (size_t i = 0; i < mozilla::ArrayLength(zoneGetters); i++) {
         if (!JS_DefineProperty(cx, zoneObj, zoneGetters[i].name, UndefinedHandleValue,
-                               JSPROP_READONLY | JSPROP_SHARED | JSPROP_ENUMERATE,
+                               JSPROP_ENUMERATE | JSPROP_SHARED,
                                zoneGetters[i].getter, nullptr))
         {
             return nullptr;
         }
     }
 
     return obj;
 }