Bug 1518648 - Tighten up a couple of assertions. r=jwalden

Differential Revision: https://phabricator.services.mozilla.com/D15991

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jason Orendorff 2019-01-14 20:04:28 +00:00
parent 61206f7677
commit e2b1e6991c

View File

@ -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;
}