Bug 1347486 - Replace MOZ_CRASH in GetCacheIRExpectedInputType with MOZ_ASSERT_UNREACHABLE. r=h4writer a=gchang
authorJan de Mooij <jdemooij@mozilla.com>
Mon, 27 Mar 2017 14:39:56 +0200
changeset 395457 0d59b5163d272ce075bf440ac0dd908073ecccfe
parent 395456 a6be6249c4648b95c18f4d0f36024c026e19ed16
child 395458 f83069cf61ed74fd3ddfa3c7a2df806ca3146d3f
push id1468
push userasasaki@mozilla.com
push dateMon, 05 Jun 2017 19:31:07 +0000
treeherdermozilla-release@0641fc6ee9d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersh4writer, gchang
bugs1347486
milestone54.0a2
Bug 1347486 - Replace MOZ_CRASH in GetCacheIRExpectedInputType with MOZ_ASSERT_UNREACHABLE. r=h4writer a=gchang
js/src/jit/BaselineInspector.cpp
--- a/js/src/jit/BaselineInspector.cpp
+++ b/js/src/jit/BaselineInspector.cpp
@@ -1157,17 +1157,19 @@ GetCacheIRExpectedInputType(ICCacheIR_Mo
     if (reader.matchOp(CacheOp::GuardIsObject, ValOperandId(0)))
         return MIRType::Object;
     if (reader.matchOp(CacheOp::GuardIsString, ValOperandId(0)))
         return MIRType::String;
     if (reader.matchOp(CacheOp::GuardType, ValOperandId(0))) {
         JSValueType type = reader.valueType();
         return MIRTypeFromValueType(type);
     }
-    MOZ_CRASH("Unexpected instruction");
+
+    MOZ_ASSERT_UNREACHABLE("Unexpected instruction");
+    return MIRType::Value;
 }
 
 MIRType
 BaselineInspector::expectedPropertyAccessInputType(jsbytecode* pc)
 {
     if (!hasBaselineScript())
         return MIRType::Value;