Fix Value::isGCThing footgun, stop returning true for NullValue

This commit is contained in:
trav90 2018-04-07 12:24:30 -05:00 committed by Roy Tam
commit 10b24b8110
31 changed files with 87 additions and 103 deletions

View file

@ -8526,8 +8526,8 @@ StoreUnboxedPointer(MacroAssembler& masm, T address, MIRType type, const LAlloca
masm.patchableCallPreBarrier(address, type);
if (value->isConstant()) {
Value v = value->toConstant()->toJSValue();
if (v.isMarkable()) {
masm.storePtr(ImmGCPtr(v.toMarkablePointer()), address);
if (v.isGCThing()) {
masm.storePtr(ImmGCPtr(v.toGCThing()), address);
} else {
MOZ_ASSERT(v.isNull());
masm.storePtr(ImmWord(0), address);