nsAutoString prop; rv = a->Item(JSVAL_TO_INT(id), prop);
rv = secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_MEDIALIST_ITEM, PR_FALSE);
GetMediaListProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp){  nsIDOMMediaList *a = (nsIDOMMediaList*)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 MEDIALIST_MEDIATEXT:      {        rv = secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_MEDIALIST_MEDIATEXT, PR_FALSE);        if (NS_SUCCEEDED(rv)) {          nsAutoString prop;          rv = a->GetMediaText(prop);          if (NS_SUCCEEDED(rv)) {            nsJSUtils::nsConvertStringToJSVal(prop, cx, vp);          }        }        break;      }      case MEDIALIST_LENGTH:      {        rv = secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_MEDIALIST_LENGTH, PR_FALSE);        if (NS_SUCCEEDED(rv)) {          PRUint32 prop;          rv = a->GetLength(&prop);          if (NS_SUCCEEDED(rv)) {            *vp = INT_TO_JSVAL(prop);          }        }        break;      }      default:      {        nsAutoString prop;        rv = a->Item(JSVAL_TO_INT(id), prop);        if (NS_SUCCEEDED(rv)) {            nsJSUtils::nsConvertStringToJSVal(prop, cx, vp);        }      }    }  }  else {    return nsJSUtils::nsCallJSScriptObjectGetProperty(a, cx, obj, id, vp);  }  if (NS_FAILED(rv))      return nsJSUtils::nsReportError(cx, obj, rv);  return PR_TRUE;}