Bug 1358596. Restore check for sanity of slot indices on DOM objects that got lost. r=qdot

This commit is contained in:
Boris Zbarsky 2017-05-02 01:55:47 -04:00
Родитель be4450a996
Коммит 45a20c4074
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -3990,11 +3990,15 @@ class CGUpdateMemberSlotsMethod(CGAbstractStaticMethod):
body += fill(
"""
static_assert(${slot} < js::shadow::Object::MAX_FIXED_SLOTS,
"Not enough fixed slots to fit '${interface}.${member}. Ion's visitGetDOMMemberV/visitGetDOMMemberT assume StoreInSlot things are all in fixed slots.");
if (!get_${member}(aCx, aWrapper, aObject, args)) {
return false;
}
// Getter handled setting our reserved slots
""",
slot=memberReservedSlot(m, self.descriptor),
interface=self.descriptor.interface.identifier.name,
member=m.identifier.name)
body += "\nreturn true;\n"