if (jindex < 0 || jindex > JavaDOMGlobals::javaMaxInt) { PR_LOG(JavaDOMGlobals::log, PR_LOG_ERROR, ("NamedNodeMap.item: invalid index value (%d)\n", jindex)); return NULL; }
JNIEXPORT jobject JNICALL Java_org_mozilla_dom_NamedNodeMapImpl_item  (JNIEnv *env, jobject jthis, jint jindex){  nsIDOMNamedNodeMap* map = (nsIDOMNamedNodeMap*)     env->GetLongField(jthis, JavaDOMGlobals::nodePtrFID);  if (!map) {    JavaDOMGlobals::ThrowException(env,      "NodeMap.item: NULL pointer");    return NULL;  }    nsIDOMNode* node = nsnull;  nsresult rv = map->Item((PRUint32) jindex, &node);  if (NS_FAILED(rv) || !node) {    JavaDOMGlobals::ThrowException(env,      "NodeMap.item: failed", rv);    return NULL;  }  return JavaDOMGlobals::CreateNodeSubtype(env, node);}