add:  if (!(v instanceof jsdIValue)) throw new BadMojo (ERR_INVALID_PARAM, "v", String(v));  
context: function formatValue (v, formatType){    if (!v)        throw new BadMojo (ERR_REQUIRED_PARAM, "v");        var type;    var value;            switch (v.jsType)    {        case jsdIValue.TYPE_BOOLEAN:            type = MSG_TYPE_BOOLEAN;            value = String(v.booleanValue);            break;        case jsdIValue.TYPE_DOUBLE:            type = MSG_TYPE_DOUBLE;            value = v.doubleValue;            break;        case jsdIValue.TYPE_INT:            type = MSG_TYPE_INT;            value = v.intValue;            break;        case jsdIValue.TYPE_FUNCTION:            type = MSG_TYPE_FUNCTION;            value = v.jsFunctionName;            break;        case jsdIValue.TYPE_NULL:            type = MSG_TYPE_NULL;            value = MSG_TYPE_NULL;            break;        case jsdIValue.TYPE_OBJECT:            if (formatType == FTYPE_STD)            {                type = MSG_TYPE_OBJECT;                value = getMsg(MSN_FMT_OBJECT, String(v.propertyCount));            }            else            {                if (v.jsClassName)                    if (v.jsClassName == "XPCWrappedNative_NoHelper")                        type = MSG_CLASS_XPCOBJ;                    else                        type = v.jsClassName;                else                    type = MSG_TYPE_OBJECT;                value = "{" + String(v.propertyCount) + "}";            }            break;        case jsdIValue.TYPE_STRING:            type = MSG_TYPE_STRING;            value = v.stringValue.quote();            if (value.length > MAX_STR_LEN)                value = getMsg(MSN_FMT_LONGSTR, value.length);            break;        case jsdIValue.TYPE_VOID:            type = MSG_TYPE_VOID;            value = MSG_TYPE_VOID;                        break;        default:            type = MSG_TYPE_UNKNOWN;            value = MSG_TYPE_UNKNOWN;            break;    }    if (formatType == FTYPE_SUMMARY)        return getMsg (MSN_FMT_VALUE_SHORT, [type, value]);    var className;    if (v.jsClassName)        if (v.jsClassName == "XPCWrappedNative_NoHelper")            /* translate this long, unintuitive, and common class name into             * something more palatable. */            className = MSG_CLASS_XPCOBJ;        else            className = v.jsClassName;    if (formatType == FTYPE_ARRAY)        return [type, className, value];    if (className)        return getMsg (MSN_FMT_VALUE_LONG, [type, v.className, value]);    return getMsg (MSN_FMT_VALUE_MED, [type, value]);}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/916119047fa4f104be4e3602bf89af84b06e2a6c/venkman-debugger.js/clean/extensions/venkman/resources/content/venkman-debugger.js