From e2b1e6991c8de5c45a52f2afe9b50994d9669ddb Mon Sep 17 00:00:00 2001 From: Jason Orendorff Date: Mon, 14 Jan 2019 20:04:28 +0000 Subject: [PATCH] Bug 1518648 - Tighten up a couple of assertions. r=jwalden Differential Revision: https://phabricator.services.mozilla.com/D15991 --HG-- extra : moz-landing-system : lando --- js/src/vm/GlobalObject.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/src/vm/GlobalObject.h b/js/src/vm/GlobalObject.h index cf1032fbef28..6ab25a062085 100644 --- a/js/src/vm/GlobalObject.h +++ b/js/src/vm/GlobalObject.h @@ -121,12 +121,12 @@ class GlobalObject : public NativeObject { "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; }