Bug 1532838 - Use correct units in a preference name r=jonco
authorPaul Bone <pbone@mozilla.com>
Mon, 06 May 2019 03:13:51 +0000
changeset 531460 81d3a25685dcde796218147075147e44177615a5
parent 531459 5a6f2d97508e58da24d3ea26e82373d621849863
child 531461 fbf69131cbda3adc802180e60c14fc6700cb2d90
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjonco
bugs1532838
milestone68.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 1532838 - Use correct units in a preference name r=jonco Differential Revision: https://phabricator.services.mozilla.com/D29814
dom/base/nsJSEnvironment.cpp
--- a/dom/base/nsJSEnvironment.cpp
+++ b/dom/base/nsJSEnvironment.cpp
@@ -2069,17 +2069,17 @@ void nsJSContext::MaybePokeCC() {
 
   // If GC hasn't run recently and forget skippable only cycle was run,
   // don't start a new cycle too soon.
   if ((sCleanupsSinceLastGC > NS_MAJOR_FORGET_SKIPPABLE_CALLS) &&
       !sLastForgetSkippableCycleEndTime.IsNull()) {
     uint32_t sinceLastForgetSkippableCycle =
         TimeUntilNow(sLastForgetSkippableCycleEndTime);
     if (sinceLastForgetSkippableCycle <
-            NS_TIME_BETWEEN_FORGET_SKIPPABLE_CYCLES) {
+        NS_TIME_BETWEEN_FORGET_SKIPPABLE_CYCLES) {
       return;
     }
   }
 
   if (ShouldTriggerCC(nsCycleCollector_suspectedCount())) {
     sCCRunnerFireCount = 0;
 
     // We can kill some objects before running forgetSkippable.
@@ -2352,19 +2352,19 @@ static void SetMemoryPrefChangedCallback
     SetGCParameter((JSGCParamKey)(uintptr_t)aClosure, prefB.value());
   } else {
     ResetGCParameter((JSGCParamKey)(uintptr_t)aClosure);
   }
 }
 
 static void SetMemoryNurseryMaxPrefChangedCallback(const char* aPrefName,
                                                    void* aClosure) {
-  int32_t prefMB = Preferences::GetInt(aPrefName, -1);
+  int32_t prefKB = Preferences::GetInt(aPrefName, -1);
   // handle overflow and negative pref values
-  CheckedInt<int32_t> prefB = CheckedInt<int32_t>(prefMB) * 1024;
+  CheckedInt<int32_t> prefB = CheckedInt<int32_t>(prefKB) * 1024;
   if (prefB.isValid() && prefB.value() >= 0) {
     SetGCParameter((JSGCParamKey)(uintptr_t)aClosure, prefB.value());
   } else {
     ResetGCParameter((JSGCParamKey)(uintptr_t)aClosure);
   }
 }
 
 static void SetMemoryPrefChangedCallbackInt(const char* aPrefName,