Bug 557247 - In debug js shell builds, expose whether we're on trace or not (tracemonkey.onTrace). r=gal.

This commit is contained in:
Jason Orendorff 2010-04-05 12:26:44 -05:00
parent cf22c89a43
commit 8187e1ef94

View File

@ -287,10 +287,18 @@ enum jitstat_ids {
STAT_IDS_TOTAL
};
static JSBool
jitstats_getOnTrace(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
{
*vp = BOOLEAN_TO_JSVAL(JS_ON_TRACE(cx));
return true;
}
static JSPropertySpec jitstats_props[] = {
#define JITSTAT(x) { #x, STAT ## x ## ID, JSPROP_ENUMERATE | JSPROP_READONLY | JSPROP_PERMANENT },
#include "jitstats.tbl"
#undef JITSTAT
{ "onTrace", 0, JSPROP_ENUMERATE | JSPROP_READONLY | JSPROP_PERMANENT, jitstats_getOnTrace, NULL },
{ 0 }
};