if (!name) {
if (!value) {
JNIEXPORT void JNICALL Java_org_mozilla_dom_ElementImpl_setAttribute  (JNIEnv *env, jobject jthis, jstring jname, jstring jvalue){  nsIDOMElement* element = (nsIDOMElement*)     env->GetLongField(jthis, JavaDOMGlobals::nodePtrFID);  if (!element) {    PR_LOG(JavaDOMGlobals::log, PR_LOG_WARNING, 	   ("Element.setAttribute: NULL pointer\n"));    return;  }  jboolean iscopy = JNI_FALSE;  const char* name = env->GetStringUTFChars(jname, &iscopy);  if (!name) {    PR_LOG(JavaDOMGlobals::log, PR_LOG_ERROR, 	   ("Element.setAttribute: GetStringUTFChars name failed\n"));    return;  }  jboolean iscopy2 = JNI_FALSE;  const char* value = env->GetStringUTFChars(jvalue, &iscopy2);  if (!name) {    PR_LOG(JavaDOMGlobals::log, PR_LOG_ERROR, 	   ("Element.setAttribute: GetStringUTFChars value failed\n"));    return;  }  nsresult rv = element->SetAttribute(name, value);  if (iscopy2 == JNI_TRUE)    env->ReleaseStringUTFChars(jvalue, value);  if (iscopy == JNI_TRUE)    env->ReleaseStringUTFChars(jname, name);  if (NS_FAILED(rv)) {    PR_LOG(JavaDOMGlobals::log, PR_LOG_ERROR, 	   ("Element.setAttribute: failed (%x)\n", rv));    return;  }}