Bug 1208259 - ARM64: Handle an empty nursery in branchValueIsNurseryObject(). r=bhackett

Fixes jsapitests testGCOutOfMemory.
This commit is contained in:
Jakob Olesen 2015-09-24 16:33:00 +02:00
Родитель 0f994c9a21
Коммит 780d346651
1 изменённых файлов: 6 добавлений и 1 удалений

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

@ -238,8 +238,13 @@ MacroAssemblerCompat::branchValueIsNurseryObject(Condition cond, ValueOperand va
MOZ_ASSERT(cond == Assembler::Equal || cond == Assembler::NotEqual); MOZ_ASSERT(cond == Assembler::Equal || cond == Assembler::NotEqual);
MOZ_ASSERT(temp != ScratchReg && temp != ScratchReg2); // Both may be used internally. MOZ_ASSERT(temp != ScratchReg && temp != ScratchReg2); // Both may be used internally.
// 'Value' representing the start of the nursery tagged as a JSObject
const Nursery& nursery = GetJitContext()->runtime->gcNursery(); const Nursery& nursery = GetJitContext()->runtime->gcNursery();
// Avoid creating a bogus ObjectValue below.
if (!nursery.exists())
return;
// 'Value' representing the start of the nursery tagged as a JSObject
Value start = ObjectValue(*reinterpret_cast<JSObject*>(nursery.start())); Value start = ObjectValue(*reinterpret_cast<JSObject*>(nursery.start()));
movePtr(ImmWord(-ptrdiff_t(start.asRawBits())), temp); movePtr(ImmWord(-ptrdiff_t(start.asRawBits())), temp);