nsJSUtils::nsConvertObjectToJSVal(nativeRet, cx, obj, rval);
*rval = nativeRet;
NSHTMLDocumentNamedItem(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval){  nsIDOMHTMLDocument *privateThis = (nsIDOMHTMLDocument*)nsJSUtils::nsGetNativeThis(cx, obj);  nsCOMPtr<nsIDOMNSHTMLDocument> nativeThis;  nsresult result = NS_OK;  if (NS_OK != privateThis->QueryInterface(kINSHTMLDocumentIID, getter_AddRefs(nativeThis))) {    return nsJSUtils::nsReportError(cx, obj, NS_ERROR_DOM_WRONG_TYPE_ERR);  }  nsIDOMElement* nativeRet;  nsAutoString b0;  // If there's no private data, this must be the prototype, so ignore  if (!nativeThis) {    return JS_TRUE;  }  {    *rval = JSVAL_NULL;    nsIScriptSecurityManager *secMan = nsJSUtils::nsGetSecurityManager(cx, obj);    if (!secMan)        return PR_FALSE;    result = secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_NSHTMLDOCUMENT_NAMEDITEM, PR_FALSE);    if (NS_FAILED(result)) {      return nsJSUtils::nsReportError(cx, obj, result);    }    if (argc < 1) {      return nsJSUtils::nsReportError(cx, obj, NS_ERROR_DOM_TOO_FEW_PARAMETERS_ERR);    }    nsJSUtils::nsConvertJSValToString(b0, cx, argv[0]);    result = nativeThis->NamedItem(b0, &nativeRet);    if (NS_FAILED(result)) {      return nsJSUtils::nsReportError(cx, obj, result);    }    nsJSUtils::nsConvertObjectToJSVal(nativeRet, cx, obj, rval);  }  return JS_TRUE;}