diff --git a/js/src/jit-test/tests/gc/bug-1138390.js b/js/src/jit-test/tests/gc/bug-1138390.js index 887897520b60..b0310e278a20 100644 --- a/js/src/jit-test/tests/gc/bug-1138390.js +++ b/js/src/jit-test/tests/gc/bug-1138390.js @@ -17,12 +17,12 @@ var g = newGlobal(); // Start an off thread compilation that will not run until GC has finished if ("gcstate" in this) - assertEq("mark", gcstate()); + assertEq(gcstate(), "mark"); g.offThreadCompileScript('23;', {}); // Wait for the compilation to finish, which must finish the GC first assertEq(23, g.runOffThreadScript()); if ("gcstate" in this) - assertEq("none", gcstate()); + assertEq(gcstate(), "none"); print("done"); diff --git a/js/src/jsgc.cpp b/js/src/jsgc.cpp index aa53e1a889d4..ebd773ec21b4 100644 --- a/js/src/jsgc.cpp +++ b/js/src/jsgc.cpp @@ -1714,7 +1714,7 @@ ZoneHeapThreshold::computeZoneTriggerBytes(double growthFactor, size_t lastBytes const GCSchedulingTunables &tunables) { size_t base = gckind == GC_SHRINK - ? lastBytes + ? Max(lastBytes, tunables.minEmptyChunkCount() * ChunkSize) : Max(lastBytes, tunables.gcZoneAllocThresholdBase()); double trigger = double(base) * growthFactor; return size_t(Min(double(tunables.gcMaxBytes()), trigger));