nsresult rv; nsCOMPtr<nsIScriptSecurityManager> securityManager = do_GetService(NS_SCRIPTSECURITYMANAGER_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv);
nsIScriptSecurityManager *securityManager = nsContentUtils::GetSecurityManager();
nsHTMLInputElement::SetValue(const nsAString& aValue){  //check secuity  if (mType == NS_FORM_INPUT_FILE) {    nsresult rv;    nsCOMPtr<nsIScriptSecurityManager> securityManager =             do_GetService(NS_SCRIPTSECURITYMANAGER_CONTRACTID, &rv);    NS_ENSURE_SUCCESS(rv, rv);    PRBool enabled;    rv = securityManager->IsCapabilityEnabled("UniversalFileRead", &enabled);    NS_ENSURE_SUCCESS(rv, rv);    if (!enabled) {      // setting the value of a "FILE" input widget requires the      // UniversalFileRead privilege      return NS_ERROR_DOM_SECURITY_ERR;    }  }  SetValueInternal(aValue, nsnull);  return NS_OK;}