Bug 1176289 - Record proper optimization tracking outcome on failure of getPropTryConstant due to non-singleton value. r=shu
--- a/js/src/jit/IonBuilder.cpp
+++ b/js/src/jit/IonBuilder.cpp
@@ -10306,18 +10306,20 @@ IonBuilder::getPropTryConstant(bool* emi
if (!types->mightBeMIRType(MIRType_Object)) {
// If we have not observed an object result here, don't look for a
// singleton constant.
trackOptimizationOutcome(TrackedOutcome::NotObject);
return true;
}
JSObject* singleton = testSingletonPropertyTypes(obj, name);
- if (!singleton)
- return true;
+ if (!singleton) {
+ trackOptimizationOutcome(TrackedOutcome::NotSingleton);
+ return true;
+ }
// Property access is a known constant -- safe to emit.
obj->setImplicitlyUsedUnchecked();
pushConstant(ObjectValue(*singleton));
trackOptimizationSuccess();
*emitted = true;