Bug 1516138 - Check GC zeal mode is in range r=allstars.chh
authorJon Coppeard <jcoppeard@mozilla.com>
Wed, 02 Jan 2019 18:19:01 +0000
changeset 452264 c60f868017bcb1de9a3daa620cccd14b7fe9a728
parent 452263 8d20164aedbf0b55d8244bfeafeb732957447d55
child 452265 38f962460f285ceb2a3273629aa7156d2260decc
push id110862
push userjcoppeard@mozilla.com
push dateWed, 02 Jan 2019 18:19:26 +0000
treeherdermozilla-inbound@38f962460f28 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersallstars
bugs1516138
milestone66.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 1516138 - Check GC zeal mode is in range r=allstars.chh
js/src/gc/GC.cpp
--- a/js/src/gc/GC.cpp
+++ b/js/src/gc/GC.cpp
@@ -1203,17 +1203,18 @@ bool GCRuntime::parseAndSetZeal(const ch
   CharRangeVector modes;
   if (!SplitStringBy(parts[0], ';', &modes)) {
     return false;
   }
 
   for (const auto& descr : modes) {
     uint32_t mode;
     if (!ParseZealModeName(descr, &mode) &&
-        !ParseZealModeNumericParam(descr, &mode)) {
+        !(ParseZealModeNumericParam(descr, &mode) &&
+          mode <= unsigned(ZealMode::Limit))) {
       return PrintZealHelpAndFail();
     }
 
     setZeal(mode, frequency);
   }
 
   return true;
 }