Bug 1518648 - Tighten up a couple of assertions. r=jwalden
authorJason Orendorff <jorendorff@mozilla.com>
Mon, 14 Jan 2019 20:04:28 +0000
changeset 510908 54c6397bb3844b170f930425188003d2d35b126a
parent 510907 3b55c65ded33d50a48b0284f0b9e0c7b8b0188ac
child 510909 1ce15a2a79e08b2b8803d42b06476d5b101111d0
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwalden
bugs1518648
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 1518648 - Tighten up a couple of assertions. r=jwalden Differential Revision: https://phabricator.services.mozilla.com/D15991
js/src/vm/GlobalObject.h
--- a/js/src/vm/GlobalObject.h
+++ b/js/src/vm/GlobalObject.h
@@ -116,22 +116,22 @@ class GlobalObject : public NativeObject
    * The slot count must be in the public API for JSCLASS_GLOBAL_FLAGS, and
    * we won't expose GlobalObject, so just assert that the two values are
    * synchronized.
    */
   static_assert(JSCLASS_GLOBAL_SLOT_COUNT == RESERVED_SLOTS,
                 "global object slot counts are inconsistent");
 
   static unsigned constructorSlot(JSProtoKey key) {
-    MOZ_ASSERT(key <= JSProto_LIMIT);
+    MOZ_ASSERT(key < JSProto_LIMIT);
     return APPLICATION_SLOTS + key;
   }
 
   static unsigned prototypeSlot(JSProtoKey key) {
-    MOZ_ASSERT(key <= JSProto_LIMIT);
+    MOZ_ASSERT(key < JSProto_LIMIT);
     return APPLICATION_SLOTS + JSProto_LIMIT + key;
   }
 
  public:
   LexicalEnvironmentObject& lexicalEnvironment() const;
   GlobalScope& emptyGlobalScope() const;
 
   void setOriginalEval(JSObject* evalobj) {