if (jvalue) { value = env->GetStringUTFChars(jvalue, &iscopy); if (!value) { JavaDOMGlobals::ThrowException(env,
const char* value = env->GetStringUTFChars(jvalue, &iscopy); if (!value) { JavaDOMGlobals::ThrowException(env,
JNIEXPORT void JNICALL Java_org_mozilla_dom_NodeImpl_setNodeValue  (JNIEnv *env, jobject jthis, jstring jvalue){  nsIDOMNode* node = (nsIDOMNode*)     env->GetLongField(jthis, JavaDOMGlobals::nodePtrFID);  if (!node) {    JavaDOMGlobals::ThrowException(env,      "Node.setNodeValue: NULL pointer");    return;  }  const char* value = NULL;  jboolean iscopy = JNI_FALSE;  if (jvalue) {    value = env->GetStringUTFChars(jvalue, &iscopy);    if (!value) {      JavaDOMGlobals::ThrowException(env,        "Node.setNodeValue: GetStringUTFChars failed");      return;    }  }  nsresult rv = node->SetNodeValue(value);  if (iscopy == JNI_TRUE)    env->ReleaseStringUTFChars(jvalue, value);  if (NS_FAILED(rv)) {    JavaDOMGlobals::ExceptionType exceptionType = JavaDOMGlobals::EXCEPTION_RUNTIME;    if (rv == NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR) {      exceptionType = JavaDOMGlobals::EXCEPTION_DOM;    }    JavaDOMGlobals::ThrowException(env,      "Node.setNodeValue: failed", rv, exceptionType);    return;  }}