if (!attr) { PR_LOG(JavaDOMGlobals::log, PR_LOG_ERROR, ("Attr.setValue: NULL pointer\n"));
if (!attr || !jval) { JavaDOMGlobals::ThrowException(env, "Attr.setValue: NULL pointer\n");
JNIEXPORT void JNICALL Java_org_mozilla_dom_AttrImpl_setValue  (JNIEnv *env, jobject jthis, jstring jval){  nsIDOMAttr* attr = (nsIDOMAttr*)     env->GetLongField(jthis, JavaDOMGlobals::nodePtrFID);  if (!attr) {    PR_LOG(JavaDOMGlobals::log, PR_LOG_ERROR, 	   ("Attr.setValue: NULL pointer\n"));    return;  }  const char* cvalue = NULL;  jboolean iscopy = JNI_FALSE;  if (jval) {    cvalue = env->GetStringUTFChars(jval, &iscopy);    if (!cvalue) {      PR_LOG(JavaDOMGlobals::log, PR_LOG_ERROR, 	     ("Attr.setValue: GetStringUTFChars failed\n"));      return;    }  }  nsresult rv = attr->SetValue(cvalue);  if (iscopy == JNI_TRUE)    env->ReleaseStringUTFChars(jval, cvalue);  if (NS_FAILED(rv)) {    PR_LOG(JavaDOMGlobals::log, PR_LOG_ERROR, 	   ("Attr.setValue: failed (%x)\n", rv));    return;  }}