Bug 1340712 - Remove MOZILLA_INTERNAL_API ifdef's from nsNetUtil.cpp; r=mcmanus

The C++ code inside libxul always uses the internal API.
This commit is contained in:
Ehsan Akhgari 2017-02-17 17:27:22 -05:00
Родитель 3aec408e65
Коммит 39ca2d769a
1 изменённых файлов: 0 добавлений и 13 удалений

Просмотреть файл

@ -385,14 +385,9 @@ NS_NewInputStreamChannelInternal(nsIChannel **outChannel,
stream = do_CreateInstance(NS_STRINGINPUTSTREAM_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
#ifdef MOZILLA_INTERNAL_API
uint32_t len;
char* utf8Bytes = ToNewUTF8String(aData, &len);
rv = stream->AdoptData(utf8Bytes, len);
#else
char* utf8Bytes = ToNewUTF8String(aData);
rv = stream->AdoptData(utf8Bytes, strlen(utf8Bytes));
#endif
nsCOMPtr<nsIChannel> channel;
rv = NS_NewInputStreamChannelInternal(getter_AddRefs(channel),
@ -1188,8 +1183,6 @@ NS_ReadInputStreamToBuffer(nsIInputStream *aInputStream,
return rv;
}
#ifdef MOZILLA_INTERNAL_API
nsresult
NS_ReadInputStreamToString(nsIInputStream *aInputStream,
nsACString &aDest,
@ -1201,8 +1194,6 @@ NS_ReadInputStreamToString(nsIInputStream *aInputStream,
return NS_ReadInputStreamToBuffer(aInputStream, &dest, aCount);
}
#endif
nsresult
NS_LoadPersistentPropertiesFromURISpec(nsIPersistentProperties **outResult,
const nsACString &aSpec)
@ -1711,11 +1702,7 @@ NS_SecurityCompareURIs(nsIURI *aSourceURI,
return false;
}
#ifdef MOZILLA_INTERNAL_API
if (!targetHost.Equals(sourceHost, nsCaseInsensitiveCStringComparator() ))
#else
if (!targetHost.Equals(sourceHost, CaseInsensitiveCompare))
#endif
{
return false;
}