diff --git a/js/src/jit/MIR.h b/js/src/jit/MIR.h index f6b4da0e7ebd..f73ecda36618 100644 --- a/js/src/jit/MIR.h +++ b/js/src/jit/MIR.h @@ -12427,6 +12427,12 @@ class MTypeBarrier return false; if (input()->type() == MIRType_Value) return false; + if (input()->type() == MIRType_ObjectOrNull) { + // The ObjectOrNull optimization is only performed when the + // barrier's type is MIRType_Null. + MOZ_ASSERT(type == MIRType_Null); + return false; + } return input()->type() != type; }