ENSURE_IOSERVICE();
nsresult rv;
NS_CheckPortSafety(PRInt32 port,                   const char* scheme){    ENSURE_IOSERVICE();    nsresult rv;    PRBool allow;        rv = gIOS->AllowPort(port, scheme, &allow);    if (NS_FAILED(rv)) {        NS_ERROR("NS_CheckPortSafety: nsIIOService::AllowPort failed\n");        return rv;    }        if (!allow)        return NS_ERROR_PORT_ACCESS_NOT_ALLOWED;    return NS_OK;}