str = JS_NewStringCopyZ, node->name);
str = JS_NewStringCopyZ(cx, node->name);
DOM_NewAttributeObject(JSContext *cx, DOM_Attribute *attr){    DOM_Node *node = (DOM_Node *)attr;    JSObject *obj;    JSString *str;    jsval v;    obj = JS_ConstructObject(cx, &DOM_AttributeClass, NULL, NULL);    if (!obj)        return NULL;    if (!JS_SetPrivate(cx, obj, attr)) {        return NULL;    }    str = JS_NewStringCopyZ, node->name);    v = STRING_TO_JSVAL(str);    if (!str ||        !JS_SetProperty(cx, obj, "name", &v))        return NULL;    str = JS_NewStringCopyZ(cx, attr->value);    v = STRING_TO_JSVAL(str);    if (!str ||        !JS_SetProperty(cx, obj, "value", &v))        return NULL;    v = JSVAL_TRUE;    if (!JS_SetProperty(cx, obj, "specified", &v))        return NULL;    node->mocha_object = obj;    return obj;}