Unbreak optimized builds so that jitstats typo-checking doesn't affect them; in builds without the global tracemonkey property, we won't have any known jitstats, so check for that case and don't do typo-checking when jitstats tests can't actually be performed. r=graydon

This commit is contained in:
Jeff Walden 2009-01-16 12:13:13 -08:00
parent 1b3b3e48d2
commit a7f81d75f6

View File

@ -43,11 +43,19 @@ function jitstatHandler(f)
f("noCompatInnerTrees");
}
var jitProps = {};
jitstatHandler(function(prop) {
jitProps[prop] = true;
});
var hadJITstats = false;
for (var p in jitProps)
hadJITstats = true;
function test(f)
{
if (!testName || testName == f.name) {
var expectedJITstats = f.jitstats;
if (expectedJITstats)
if (hadJITstats && expectedJITstats)
{
var expectedProps = {};
jitstatHandler(function(prop) {
@ -57,7 +65,7 @@ function test(f)
for (var p in expectedJITstats)
{
if (!(p in expectedProps))
throw "Bad property in " + f.name + ".expected: " + p;
throw "Bad property in " + f.name + ".jitstats: " + p;
}
}