Bug 1421358 - Remove GCRuntime::notifyDidPaint and refresh_frame_slices.enabled pref. r?jonco draft
authorAdrian Wielgosik <adrian.wielgosik@gmail.com>
Wed, 13 Dec 2017 23:52:31 +0100
changeset 711869 7cd04d4c640581435d223aae70521980319690b1
parent 711413 22d2831cc1f41e1b3e1ebac9be5a7aff33684843
child 743911 e9e8a4f903ae2bc0e349f5209b19e960f93154c7
push id93183
push userbmo:adrian.wielgosik@gmail.com
push dateThu, 14 Dec 2017 22:23:53 +0000
reviewersjonco
bugs1421358
milestone59.0a1
Bug 1421358 - Remove GCRuntime::notifyDidPaint and refresh_frame_slices.enabled pref. r?jonco MozReview-Commit-ID: HBh0qyPckKv
dom/base/nsJSEnvironment.cpp
dom/workers/RuntimeService.cpp
dom/workers/Workers.h
js/public/GCAPI.h
js/src/builtin/TestingFunctions.cpp
js/src/gc/GCEnum.h
js/src/gc/GCRuntime.h
js/src/jsgc.cpp
modules/libpref/init/all.js
servo/components/script/script_runtime.rs
servo/resources/prefs.json
--- a/dom/base/nsJSEnvironment.cpp
+++ b/dom/base/nsJSEnvironment.cpp
@@ -2715,20 +2715,16 @@ nsJSContext::EnsureStatics()
                                        "javascript.options.mem.gc_high_frequency_time_limit_ms",
                                        (void *)JSGC_HIGH_FREQUENCY_TIME_LIMIT);
 
   Preferences::RegisterCallbackAndCall(SetMemoryPrefChangedCallbackBool,
                                        "javascript.options.mem.gc_dynamic_mark_slice",
                                        (void *)JSGC_DYNAMIC_MARK_SLICE);
 
   Preferences::RegisterCallbackAndCall(SetMemoryPrefChangedCallbackBool,
-                                       "javascript.options.mem.gc_refresh_frame_slices_enabled",
-                                       (void *)JSGC_REFRESH_FRAME_SLICES_ENABLED);
-
-  Preferences::RegisterCallbackAndCall(SetMemoryPrefChangedCallbackBool,
                                        "javascript.options.mem.gc_dynamic_heap_growth",
                                        (void *)JSGC_DYNAMIC_HEAP_GROWTH);
 
   Preferences::RegisterCallbackAndCall(SetMemoryPrefChangedCallbackInt,
                                        "javascript.options.mem.gc_low_frequency_heap_growth",
                                        (void *)JSGC_LOW_FREQUENCY_HEAP_GROWTH);
 
   Preferences::RegisterCallbackAndCall(SetMemoryPrefChangedCallbackInt,
--- a/dom/workers/RuntimeService.cpp
+++ b/dom/workers/RuntimeService.cpp
@@ -547,25 +547,16 @@ LoadJSGCMemoryOptions(const char* aPrefN
     if (memPrefName == matchName ||
         (gRuntimeServiceDuringInit && index == 14)) {
       bool prefValue = GetWorkerPref(matchName, false);
       UpdateOtherJSGCMemoryOption(rts, JSGC_COMPACTING_ENABLED,
                                  prefValue ? 0 : 1);
       continue;
     }
 
-    matchName.RebindLiteral(PREF_MEM_OPTIONS_PREFIX "gc_refresh_frame_slices_enabled");
-    if (memPrefName == matchName ||
-        (gRuntimeServiceDuringInit && index == 15)) {
-      bool prefValue = GetWorkerPref(matchName, false);
-      UpdateOtherJSGCMemoryOption(rts, JSGC_REFRESH_FRAME_SLICES_ENABLED,
-                                 prefValue ? 0 : 1);
-      continue;
-    }
-
 #ifdef DEBUG
     nsAutoCString message("Workers don't support the 'mem.");
     message.Append(memPrefName);
     message.AppendLiteral("' preference!");
     NS_WARNING(message.get());
 #endif
   }
 }
--- a/dom/workers/Workers.h
+++ b/dom/workers/Workers.h
@@ -90,17 +90,16 @@ struct JSSettings
     JSSettings_JSGC_HIGH_FREQUENCY_HEAP_GROWTH_MIN,
     JSSettings_JSGC_HIGH_FREQUENCY_HEAP_GROWTH_MAX,
     JSSettings_JSGC_HIGH_FREQUENCY_LOW_LIMIT,
     JSSettings_JSGC_HIGH_FREQUENCY_HIGH_LIMIT,
     JSSettings_JSGC_ALLOCATION_THRESHOLD,
     JSSettings_JSGC_SLICE_TIME_BUDGET,
     JSSettings_JSGC_DYNAMIC_HEAP_GROWTH,
     JSSettings_JSGC_DYNAMIC_MARK_SLICE,
-    JSSettings_JSGC_REFRESH_FRAME_SLICES,
     // JSGC_MODE not supported
 
     // This must be last so that we get an accurate count.
     kGCSettingsArraySize
   };
 
   struct JSGCSetting
   {
--- a/js/public/GCAPI.h
+++ b/js/public/GCAPI.h
@@ -240,24 +240,16 @@ typedef enum JSGCParamKey {
      * Whether compacting GC is enabled.
      *
      * Pref: javascript.options.mem.gc_compacting
      * Default: CompactingEnabled
      */
     JSGC_COMPACTING_ENABLED = 23,
 
     /**
-     * If true, painting can trigger IGC slices.
-     *
-     * Pref: javascript.options.mem.gc_refresh_frame_slices_enabled
-     * Default: RefreshFrameSlicesEnabled
-     */
-    JSGC_REFRESH_FRAME_SLICES_ENABLED = 24,
-
-    /**
      * Factor for triggering a GC based on JSGC_ALLOCATION_THRESHOLD
      *
      * Default: ZoneAllocThresholdFactorDefault
      * Pref: None
      */
     JSGC_ALLOCATION_THRESHOLD_FACTOR = 25,
 
     /**
@@ -385,17 +377,17 @@ struct Zone;
     D(PAGE_HIDE)                                \
     D(NSJSCONTEXT_DESTROY)                      \
     D(SET_NEW_DOCUMENT)                         \
     D(SET_DOC_SHELL)                            \
     D(DOM_UTILS)                                \
     D(DOM_IPC)                                  \
     D(DOM_WORKER)                               \
     D(INTER_SLICE_GC)                           \
-    D(REFRESH_FRAME)                            \
+    D(UNUSED1)                                  \
     D(FULL_GC_TIMER)                            \
     D(SHUTDOWN_CC)                              \
     D(UNUSED2)                                  \
     D(USER_INACTIVE)                            \
     D(XPCONNECT_SHUTDOWN)                       \
     D(DOCSHELL)                                 \
     D(HTML_PARSER)
 
--- a/js/src/builtin/TestingFunctions.cpp
+++ b/js/src/builtin/TestingFunctions.cpp
@@ -365,18 +365,17 @@ MinorGC(JSContext* cx, unsigned argc, Va
     _("highFrequencyHeapGrowthMax", JSGC_HIGH_FREQUENCY_HEAP_GROWTH_MAX, true)  \
     _("highFrequencyHeapGrowthMin", JSGC_HIGH_FREQUENCY_HEAP_GROWTH_MIN, true)  \
     _("lowFrequencyHeapGrowth",     JSGC_LOW_FREQUENCY_HEAP_GROWTH,      true)  \
     _("dynamicHeapGrowth",          JSGC_DYNAMIC_HEAP_GROWTH,            true)  \
     _("dynamicMarkSlice",           JSGC_DYNAMIC_MARK_SLICE,             true)  \
     _("allocationThreshold",        JSGC_ALLOCATION_THRESHOLD,           true)  \
     _("minEmptyChunkCount",         JSGC_MIN_EMPTY_CHUNK_COUNT,          true)  \
     _("maxEmptyChunkCount",         JSGC_MAX_EMPTY_CHUNK_COUNT,          true)  \
-    _("compactingEnabled",          JSGC_COMPACTING_ENABLED,             true)  \
-    _("refreshFrameSlicesEnabled",  JSGC_REFRESH_FRAME_SLICES_ENABLED,   true)
+    _("compactingEnabled",          JSGC_COMPACTING_ENABLED,             true)
 
 static const struct ParamInfo {
     const char*     name;
     JSGCParamKey    param;
     bool            writable;
 } paramMap[] = {
 #define DEFINE_PARAM_INFO(name, key, writable)                                  \
     {name, key, writable},
--- a/js/src/gc/GCEnum.h
+++ b/js/src/gc/GCEnum.h
@@ -55,19 +55,17 @@ enum class AbortReason {
 #define MAKE_REASON(name) name,
     GC_ABORT_REASONS(MAKE_REASON)
 #undef MAKE_REASON
 };
 
 #define JS_FOR_EACH_ZEAL_MODE(D)       \
     D(RootsChange, 1)                  \
     D(Alloc, 2)                        \
-    D(FrameGC, 3)                      \
     D(VerifierPre, 4)                  \
-    D(FrameVerifierPre, 5)             \
     D(GenerationalGC, 7)               \
     D(IncrementalRootsThenFinish, 8)   \
     D(IncrementalMarkAllThenFinish, 9) \
     D(IncrementalMultipleSlices, 10)   \
     D(IncrementalMarkingValidator, 11) \
     D(ElementsBarrier, 12)             \
     D(CheckHashTablesOnMinorGC, 13)    \
     D(Compact, 14)                     \
--- a/js/src/gc/GCRuntime.h
+++ b/js/src/gc/GCRuntime.h
@@ -236,23 +236,16 @@ class GCSchedulingTunables
     /*
      * JSGC_DYNAMIC_MARK_SLICE
      *
      * Doubles the length of IGC slices when in the |highFrequencyGC| mode.
      */
     ActiveThreadData<bool> dynamicMarkSliceEnabled_;
 
     /*
-     * JSGC_REFRESH_FRAME_SLICES_ENABLED
-     *
-     * Controls whether painting can trigger IGC slices.
-     */
-    ActiveThreadData<bool> refreshFrameSlicesEnabled_;
-
-    /*
      * JSGC_MIN_EMPTY_CHUNK_COUNT
      * JSGC_MAX_EMPTY_CHUNK_COUNT
      *
      * Controls the number of empty chunks reserved for future allocation.
      */
     UnprotectedData<uint32_t> minEmptyChunkCount_;
     UnprotectedData<uint32_t> maxEmptyChunkCount_;
 
@@ -269,17 +262,16 @@ class GCSchedulingTunables
     bool isDynamicHeapGrowthEnabled() const { return dynamicHeapGrowthEnabled_; }
     uint64_t highFrequencyThresholdUsec() const { return highFrequencyThresholdUsec_; }
     uint64_t highFrequencyLowLimitBytes() const { return highFrequencyLowLimitBytes_; }
     uint64_t highFrequencyHighLimitBytes() const { return highFrequencyHighLimitBytes_; }
     double highFrequencyHeapGrowthMax() const { return highFrequencyHeapGrowthMax_; }
     double highFrequencyHeapGrowthMin() const { return highFrequencyHeapGrowthMin_; }
     double lowFrequencyHeapGrowth() const { return lowFrequencyHeapGrowth_; }
     bool isDynamicMarkSliceEnabled() const { return dynamicMarkSliceEnabled_; }
-    bool areRefreshFrameSlicesEnabled() const { return refreshFrameSlicesEnabled_; }
     unsigned minEmptyChunkCount(const AutoLockGC&) const { return minEmptyChunkCount_; }
     unsigned maxEmptyChunkCount() const { return maxEmptyChunkCount_; }
 
     MOZ_MUST_USE bool setParameter(JSGCParamKey key, uint32_t value, const AutoLockGC& lock);
     void resetParameter(JSGCParamKey key, const AutoLockGC& lock);
 
     void setMaxMallocBytes(size_t value);
 
@@ -799,17 +791,16 @@ class GCRuntime
 
     enum TraceOrMarkRuntime {
         TraceRuntime,
         MarkRuntime
     };
     void traceRuntime(JSTracer* trc, AutoLockForExclusiveAccess& lock);
     void traceRuntimeForMinorGC(JSTracer* trc, AutoLockForExclusiveAccess& lock);
 
-    void notifyDidPaint();
     void shrinkBuffers();
     void onOutOfMallocMemory();
     void onOutOfMallocMemory(const AutoLockGC& lock);
 
 #ifdef JS_GC_ZEAL
     const void* addressOfZealModeBits() { return &zealModeBits; }
     void getZealBits(uint32_t* zealBits, uint32_t* frequency, uint32_t* nextScheduled);
     void setZeal(uint8_t zeal, uint32_t frequency);
@@ -1383,23 +1374,16 @@ class GCRuntime
     ActiveThreadData<ZoneList> zonesToMaybeCompact;
     ActiveThreadData<Arena*> relocatedArenasToRelease;
 
 #ifdef JS_GC_ZEAL
     ActiveThreadData<MarkingValidator*> markingValidator;
 #endif
 
     /*
-     * Indicates that a GC slice has taken place in the middle of an animation
-     * frame, rather than at the beginning. In this case, the next slice will be
-     * delayed so that we don't get back-to-back slices.
-     */
-    ActiveThreadData<bool> interFrameGC;
-
-    /*
      * Default budget for incremental GC slice. See js/SliceBudget.h.
      *
      * JSGC_SLICE_TIME_BUDGET
      * pref: javascript.options.mem.gc_incremental_slice_ms,
      */
     ActiveThreadData<int64_t> defaultTimeBudget_;
 
     /*
--- a/js/src/jsgc.cpp
+++ b/js/src/jsgc.cpp
@@ -320,19 +320,16 @@ namespace TuningDefaults {
     static const double HighFrequencyHeapGrowthMin = 1.5;
 
     /* JSGC_LOW_FREQUENCY_HEAP_GROWTH */
     static const double LowFrequencyHeapGrowth = 1.5;
 
     /* JSGC_DYNAMIC_MARK_SLICE */
     static const bool DynamicMarkSliceEnabled = false;
 
-    /* JSGC_REFRESH_FRAME_SLICES_ENABLED */
-    static const bool RefreshFrameSlicesEnabled = true;
-
     /* JSGC_MIN_EMPTY_CHUNK_COUNT */
     static const uint32_t MinEmptyChunkCount = 1;
 
     /* JSGC_MAX_EMPTY_CHUNK_COUNT */
     static const uint32_t MaxEmptyChunkCount = 30;
 
     /* JSGC_SLICE_TIME_BUDGET */
     static const int64_t DefaultTimeBudget = SliceBudget::UnlimitedTimeBudget;
@@ -937,17 +934,16 @@ GCRuntime::GCRuntime(JSRuntime* rt) :
     sweepZone(nullptr),
     abortSweepAfterCurrentGroup(false),
     arenasAllocatedDuringSweep(nullptr),
     startedCompacting(false),
     relocatedArenasToRelease(nullptr),
 #ifdef JS_GC_ZEAL
     markingValidator(nullptr),
 #endif
-    interFrameGC(false),
     defaultTimeBudget_(TuningDefaults::DefaultTimeBudget),
     incrementalAllowed(true),
     compactingEnabled(TuningDefaults::CompactingEnabled),
     rootsRemoved(false),
 #ifdef JS_GC_ZEAL
     zealModeBits(0),
     zealFrequency(0),
     nextScheduled(0),
@@ -985,19 +981,17 @@ const char* gc::ZealModeHelpText =
     "  Specifies how zealous the garbage collector should be. Some of these modes can\n"
     "  be set simultaneously, by passing multiple level options, e.g. \"2;4\" will activate\n"
     "  both modes 2 and 4. Modes can be specified by name or number.\n"
     "  \n"
     "  Values:\n"
     "    0: (None) Normal amount of collection (resets all modes)\n"
     "    1: (RootsChange) Collect when roots are added or removed\n"
     "    2: (Alloc) Collect when every N allocations (default: 100)\n"
-    "    3: (FrameGC) Collect when the window paints (browser only)\n"
     "    4: (VerifierPre) Verify pre write barriers between instructions\n"
-    "    5: (FrameVerifierPre) Verify pre write barriers between paints\n"
     "    7: (GenerationalGC) Collect the nursery every N nursery allocations\n"
     "    8: (IncrementalRootsThenFinish) Incremental GC in two slices: 1) mark roots 2) finish collection\n"
     "    9: (IncrementalMarkAllThenFinish) Incremental GC in two slices: 1) mark all 2) new marking and finish\n"
     "   10: (IncrementalMultipleSlices) Incremental GC in multiple slices\n"
     "   11: (IncrementalMarkingValidator) Verify incremental marking\n"
     "   12: (ElementsBarrier) Always use the individual element post-write barrier, regardless of elements size\n"
     "   13: (CheckHashTablesOnMinorGC) Check internal hashtables on minor GC\n"
     "   14: (Compact) Perform a shrinking collection every N allocations\n"
@@ -1373,19 +1367,16 @@ GCSchedulingTunables::setParameter(JSGCP
         break;
       }
       case JSGC_MIN_EMPTY_CHUNK_COUNT:
         setMinEmptyChunkCount(value);
         break;
       case JSGC_MAX_EMPTY_CHUNK_COUNT:
         setMaxEmptyChunkCount(value);
         break;
-      case JSGC_REFRESH_FRAME_SLICES_ENABLED:
-        refreshFrameSlicesEnabled_ = value != 0;
-        break;
       default:
         MOZ_CRASH("Unknown GC parameter.");
     }
 
     return true;
 }
 
 void
@@ -1441,17 +1432,16 @@ GCSchedulingTunables::GCSchedulingTunabl
     dynamicHeapGrowthEnabled_(TuningDefaults::DynamicHeapGrowthEnabled),
     highFrequencyThresholdUsec_(TuningDefaults::HighFrequencyThresholdUsec),
     highFrequencyLowLimitBytes_(TuningDefaults::HighFrequencyLowLimitBytes),
     highFrequencyHighLimitBytes_(TuningDefaults::HighFrequencyHighLimitBytes),
     highFrequencyHeapGrowthMax_(TuningDefaults::HighFrequencyHeapGrowthMax),
     highFrequencyHeapGrowthMin_(TuningDefaults::HighFrequencyHeapGrowthMin),
     lowFrequencyHeapGrowth_(TuningDefaults::LowFrequencyHeapGrowth),
     dynamicMarkSliceEnabled_(TuningDefaults::DynamicMarkSliceEnabled),
-    refreshFrameSlicesEnabled_(TuningDefaults::RefreshFrameSlicesEnabled),
     minEmptyChunkCount_(TuningDefaults::MinEmptyChunkCount),
     maxEmptyChunkCount_(TuningDefaults::MaxEmptyChunkCount)
 {}
 
 void
 GCRuntime::resetParameter(JSGCParamKey key, AutoLockGC& lock)
 {
     switch (key) {
@@ -1529,19 +1519,16 @@ GCSchedulingTunables::resetParameter(JSG
         allocThresholdFactorAvoidInterrupt_ = TuningDefaults::AllocThresholdFactorAvoidInterrupt;
         break;
       case JSGC_MIN_EMPTY_CHUNK_COUNT:
         setMinEmptyChunkCount(TuningDefaults::MinEmptyChunkCount);
         break;
       case JSGC_MAX_EMPTY_CHUNK_COUNT:
         setMaxEmptyChunkCount(TuningDefaults::MaxEmptyChunkCount);
         break;
-      case JSGC_REFRESH_FRAME_SLICES_ENABLED:
-        refreshFrameSlicesEnabled_ = TuningDefaults::RefreshFrameSlicesEnabled;
-        break;
       default:
         MOZ_CRASH("Unknown GC parameter.");
     }
 }
 
 uint32_t
 GCRuntime::getParameter(JSGCParamKey key, const AutoLockGC& lock)
 {
@@ -1593,18 +1580,16 @@ GCRuntime::getParameter(JSGCParamKey key
       case JSGC_ALLOCATION_THRESHOLD_FACTOR_AVOID_INTERRUPT:
         return uint32_t(tunables.allocThresholdFactorAvoidInterrupt() * 100);
       case JSGC_MIN_EMPTY_CHUNK_COUNT:
         return tunables.minEmptyChunkCount(lock);
       case JSGC_MAX_EMPTY_CHUNK_COUNT:
         return tunables.maxEmptyChunkCount();
       case JSGC_COMPACTING_ENABLED:
         return compactingEnabled;
-      case JSGC_REFRESH_FRAME_SLICES_ENABLED:
-        return tunables.areRefreshFrameSlicesEnabled();
       default:
         MOZ_ASSERT(key == JSGC_NUMBER);
         return uint32_t(number);
     }
 }
 
 void
 GCRuntime::setMarkStackLimit(size_t limit, AutoLockGC& lock)
@@ -7281,17 +7266,16 @@ GCRuntime::gcCycle(bool nonincrementalBy
 
     gcstats::AutoGCSlice agc(stats(), scanZonesBeforeGC(), invocationKind, budget, reason);
 
     minorGC(reason, gcstats::PhaseKind::EVICT_NURSERY_FOR_MAJOR_GC);
 
     AutoTraceSession session(rt, JS::HeapState::MajorCollecting);
 
     majorGCTriggerReason = JS::gcreason::NO_REASON;
-    interFrameGC = true;
 
     number++;
     if (!isIncrementalGCInProgress())
         incMajorGcNumber();
 
     // It's ok if threads other than the active thread have suppressGC set, as
     // they are operating on zones which will not be collected from here.
     MOZ_ASSERT(!TlsContext.get()->suppressGC);
@@ -7590,40 +7574,16 @@ GCRuntime::abortGC()
 {
     MOZ_ASSERT(isIncrementalGCInProgress());
     checkCanCallAPI();
     MOZ_ASSERT(!TlsContext.get()->suppressGC);
 
     collect(false, SliceBudget::unlimited(), JS::gcreason::ABORT_GC);
 }
 
-void
-GCRuntime::notifyDidPaint()
-{
-    MOZ_ASSERT(CurrentThreadCanAccessRuntime(rt));
-
-#ifdef JS_GC_ZEAL
-    if (hasZealMode(ZealMode::FrameVerifierPre))
-        verifyPreBarriers();
-
-    if (hasZealMode(ZealMode::FrameGC)) {
-        JS::PrepareForFullGC(rt->activeContextFromOwnThread());
-        gc(GC_NORMAL, JS::gcreason::REFRESH_FRAME);
-        return;
-    }
-#endif
-
-    if (isIncrementalGCInProgress() && !interFrameGC && tunables.areRefreshFrameSlicesEnabled()) {
-        JS::PrepareForIncrementalGC(rt->activeContextFromOwnThread());
-        gcSlice(JS::gcreason::REFRESH_FRAME);
-    }
-
-    interFrameGC = false;
-}
-
 static bool
 ZonesSelected(JSRuntime* rt)
 {
     for (ZonesIter zone(rt, WithAtoms); !zone.done(); zone.next()) {
         if (zone->isGCScheduled())
             return true;
     }
     return false;
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -1484,19 +1484,16 @@ pref("javascript.options.mem.gc_low_freq
 // JSGC_DYNAMIC_HEAP_GROWTH
 // Override SpiderMonkey default (false).
 pref("javascript.options.mem.gc_dynamic_heap_growth", true);
 
 // JSGC_DYNAMIC_MARK_SLICE
 // Override SpiderMonkey default (false).
 pref("javascript.options.mem.gc_dynamic_mark_slice", true);
 
-// JSGC_REFRESH_FRAME_SLICES_ENABLED
-pref("javascript.options.mem.gc_refresh_frame_slices_enabled", true);
-
 // JSGC_ALLOCATION_THRESHOLD
 pref("javascript.options.mem.gc_allocation_threshold_mb", 30);
 
 // JSGC_ALLOCATION_THRESHOLD_FACTOR
 pref("javascript.options.mem.gc_allocation_threshold_factor", 90);
 
 // JSGC_ALLOCATION_THRESHOLD_FACTOR_AVOID_INTERRUPT
 pref("javascript.options.mem.gc_allocation_threshold_factor_avoid_interrupt", 90);
--- a/servo/components/script/script_runtime.rs
+++ b/servo/components/script/script_runtime.rs
@@ -255,17 +255,16 @@ pub unsafe fn new_rt_and_cx() -> Runtime
     if let Some(val) = PREFS.get("js.mem.gc.high_frequency_time_limit_ms").as_i64() {
         if val >= 0 && val < 10000 {
             JS_SetGCParameter(runtime.rt(), JSGCParamKey::JSGC_HIGH_FREQUENCY_TIME_LIMIT, val as u32);
         }
     }
     if let Some(val) = PREFS.get("js.mem.gc.dynamic_mark_slice.enabled").as_boolean() {
         JS_SetGCParameter(runtime.rt(), JSGCParamKey::JSGC_DYNAMIC_MARK_SLICE, val as u32);
     }
-    // TODO: handle js.mem.gc.refresh_frame_slices.enabled
     if let Some(val) = PREFS.get("js.mem.gc.dynamic_heap_growth.enabled").as_boolean() {
         JS_SetGCParameter(runtime.rt(), JSGCParamKey::JSGC_DYNAMIC_HEAP_GROWTH, val as u32);
     }
     if let Some(val) = PREFS.get("js.mem.gc.low_frequency_heap_growth").as_i64() {
         if val >= 0 && val < 10000 {
             JS_SetGCParameter(runtime.rt(), JSGCParamKey::JSGC_LOW_FREQUENCY_HEAP_GROWTH, val as u32);
         }
     }
--- a/servo/resources/prefs.json
+++ b/servo/resources/prefs.json
@@ -40,17 +40,16 @@
   "js.mem.gc.high_frequency_heap_growth_min": 150,
   "js.mem.gc.high_frequency_high_limit_mb": 500,
   "js.mem.gc.high_frequency_low_limit_mb": 100,
   "js.mem.gc.high_frequency_time_limit_ms": 1000,
   "js.mem.gc.incremental.enabled": true,
   "js.mem.gc.incremental.slice_ms": 10,
   "js.mem.gc.low_frequency_heap_growth": 150,
   "js.mem.gc.per_compartment.enabled": true,
-  "js.mem.gc.refresh_frame_slices.enabled": true,
   "js.mem.gc.zeal.frequency": 100,
   "js.mem.gc.zeal.level": 0,
   "js.mem.high_water_mark": 128,
   "js.mem.max": -1,
   "js.native_regexp.enabled": true,
   "js.parallel_parsing.enabled": true,
   "js.shared_memory.enabled": true,
   "js.strict.debug.enabled": false,