return nsJSUtils::nsCallJSScriptObjectGetProperty(a, cx, obj, id, vp);
{ rv = secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_HISTORY_ITEM, PR_FALSE); if (NS_SUCCEEDED(rv)) { nsAutoString prop; rv = a->Item(JSVAL_TO_INT(id), prop); if (NS_SUCCEEDED(rv)) { nsJSUtils::nsConvertStringToJSVal(prop, cx, vp); } } }
GetHistoryProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp){  nsIDOMHistory *a = (nsIDOMHistory*)nsJSUtils::nsGetNativeThis(cx, obj);  // If there's no private data, this must be the prototype, so ignore  if (nsnull == a) {    return JS_TRUE;  }  nsresult rv = NS_OK;  if (JSVAL_IS_INT(id)) {    nsIScriptSecurityManager *secMan = nsJSUtils::nsGetSecurityManager(cx, obj);    if (!secMan)        return PR_FALSE;    switch(JSVAL_TO_INT(id)) {      case HISTORY_LENGTH:      {        rv = secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_HISTORY_LENGTH, PR_FALSE);        if (NS_SUCCEEDED(rv)) {          PRInt32 prop;          rv = a->GetLength(&prop);          if (NS_SUCCEEDED(rv)) {            *vp = INT_TO_JSVAL(prop);          }        }        break;      }      case HISTORY_CURRENT:      {        rv = secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_HISTORY_CURRENT, PR_FALSE);        if (NS_SUCCEEDED(rv)) {          nsAutoString prop;          rv = a->GetCurrent(prop);          if (NS_SUCCEEDED(rv)) {            nsJSUtils::nsConvertStringToJSVal(prop, cx, vp);          }        }        break;      }      case HISTORY_PREVIOUS:      {        rv = secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_HISTORY_PREVIOUS, PR_FALSE);        if (NS_SUCCEEDED(rv)) {          nsAutoString prop;          rv = a->GetPrevious(prop);          if (NS_SUCCEEDED(rv)) {            nsJSUtils::nsConvertStringToJSVal(prop, cx, vp);          }        }        break;      }      case HISTORY_NEXT:      {        rv = secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_HISTORY_NEXT, PR_FALSE);        if (NS_SUCCEEDED(rv)) {          nsAutoString prop;          rv = a->GetNext(prop);          if (NS_SUCCEEDED(rv)) {            nsJSUtils::nsConvertStringToJSVal(prop, cx, vp);          }        }        break;      }      default:        return nsJSUtils::nsCallJSScriptObjectGetProperty(a, cx, obj, id, vp);    }  }  else {    return nsJSUtils::nsCallJSScriptObjectGetProperty(a, cx, obj, id, vp);  }  if (NS_FAILED(rv))      return nsJSUtils::nsReportError(cx, obj, rv);  return PR_TRUE;}