Bug 1875795 - Add test and assertion. r=iain

Differential Revision: https://phabricator.services.mozilla.com/D199234
This commit is contained in:
Jan de Mooij 2024-04-03 09:28:29 +00:00
parent 7a6d8fd713
commit a3ea5c6787
2 changed files with 9 additions and 0 deletions

View file

@ -0,0 +1,7 @@
// |jit-test| --fast-warmup; --no-threads; skip-if: !('oomTest' in this)
oomTest(function() {
var o = {};
for (var p in this) {
o[p] = 1;
}
});

View file

@ -3168,6 +3168,8 @@ void MacroAssembler::emitMegamorphicCachedSetSlot(
passABIArg(scratch2);
callWithABI<Fn, NativeObject::growSlotsPure>();
storeCallPointerResult(scratch2);
MOZ_ASSERT(!save.has(scratch2));
PopRegsInMask(save);
branchIfFalseBool(scratch2, &cacheMiss);