}
GetMimeTypeArrayProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp){  nsIDOMMimeTypeArray *a = (nsIDOMMimeTypeArray*)nsJSUtils::nsGetNativeThis(cx, obj);  // If there's no private data, this must be the prototype, so ignore  if (nsnull == a) {    return JS_TRUE;  }  PRBool checkNamedItem = PR_TRUE;  nsresult rv = NS_OK;  if (JSVAL_IS_INT(id)) {    nsIScriptSecurityManager *secMan = nsJSUtils::nsGetSecurityManager(cx, obj);    if (!secMan)        return PR_FALSE;    checkNamedItem = PR_FALSE;    switch(JSVAL_TO_INT(id)) {      case MIMETYPEARRAY_LENGTH:      {        rv = secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_MIMETYPEARRAY_LENGTH, PR_FALSE);        if (NS_SUCCEEDED(rv)) {          PRUint32 prop;          rv = a->GetLength(&prop);          if (NS_SUCCEEDED(rv)) {            *vp = INT_TO_JSVAL(prop);          }        }        break;      }      default:      {        nsIDOMMimeType* prop;        rv = a->Item(JSVAL_TO_INT(id), &prop);        if (NS_SUCCEEDED(rv)) {            // get the js object            nsJSUtils::nsConvertObjectToJSVal((nsISupports *)prop, cx, obj, vp);        }      }    }  }  if (checkNamedItem) {    nsIDOMMimeType* prop;    nsAutoString name;    nsresult result = NS_OK;    JSString *jsstring = JS_ValueToString(cx, id);    if (nsnull != jsstring) {      name.Assign(NS_REINTERPRET_CAST(const PRUnichar*, JS_GetStringChars(jsstring)));    }    else {      name.SetLength(0);    }    result = a->NamedItem(name, &prop);    if (NS_SUCCEEDED(result)) {      if (NULL != prop) {            // get the js object            nsJSUtils::nsConvertObjectToJSVal((nsISupports *)prop, cx, obj, vp);      }      else {        return nsJSUtils::nsCallJSScriptObjectGetProperty(a, cx, obj, id, vp);      }    }    else {      return nsJSUtils::nsReportError(cx, obj, result);    }  }  else {    return nsJSUtils::nsCallJSScriptObjectGetProperty(a, cx, obj, id, vp);  }  if (NS_FAILED(rv))      return nsJSUtils::nsReportError(cx, obj, rv);  return PR_TRUE;}