diff --git a/layout/mathml/nsMathMLChar.cpp b/layout/mathml/nsMathMLChar.cpp index 3c44f56f0f9..f8b2f4e53b8 100644 --- a/layout/mathml/nsMathMLChar.cpp +++ b/layout/mathml/nsMathMLChar.cpp @@ -164,9 +164,7 @@ LoadProperties(const nsString& aName, uriStr.StripWhitespace(); // that may come from aName uriStr.AppendLiteral(".properties"); return NS_LoadPersistentPropertiesFromURISpec(getter_AddRefs(aProperties), - NS_ConvertUTF16toUTF8(uriStr), - nsContentUtils::GetSystemPrincipal(), - nsIContentPolicy::TYPE_OTHER); + NS_ConvertUTF16toUTF8(uriStr)); } class nsPropertiesTable final : public nsGlyphTable { diff --git a/layout/mathml/nsMathMLOperators.cpp b/layout/mathml/nsMathMLOperators.cpp index 6a32721e8e7..7b08667d99b 100644 --- a/layout/mathml/nsMathMLOperators.cpp +++ b/layout/mathml/nsMathMLOperators.cpp @@ -224,9 +224,7 @@ InitOperators(void) nsCOMPtr mathfontProp; rv = NS_LoadPersistentPropertiesFromURISpec( getter_AddRefs(mathfontProp), - NS_LITERAL_CSTRING("resource://gre/res/fonts/mathfont.properties"), - nsContentUtils::GetSystemPrincipal(), - nsIContentPolicy::TYPE_OTHER); + NS_LITERAL_CSTRING("resource://gre/res/fonts/mathfont.properties")); if (NS_FAILED(rv)) return rv; diff --git a/netwerk/base/nsNetUtil.cpp b/netwerk/base/nsNetUtil.cpp index f80254d8fa5..1174f9d627a 100644 --- a/netwerk/base/nsNetUtil.cpp +++ b/netwerk/base/nsNetUtil.cpp @@ -11,6 +11,7 @@ #include "nsNetUtil.inl" #include "mozIApplicationClearPrivateDataParams.h" #include "nsCategoryCache.h" +#include "nsContentUtils.h" #include "nsHashKeys.h" #include "nsHttp.h" #include "nsIAsyncStreamCopier.h" @@ -1153,25 +1154,22 @@ NS_ReadInputStreamToString(nsIInputStream *aInputStream, #endif nsresult -NS_LoadPersistentPropertiesFromURI(nsIPersistentProperties **outResult, - nsIURI *aUri, - nsIPrincipal *aLoadingPrincipal, - nsContentPolicyType aContentPolicyType, - nsIIOService *aIoService /* = nullptr */) +NS_LoadPersistentPropertiesFromURISpec(nsIPersistentProperties **outResult, + const nsACString &aSpec) { + nsCOMPtr uri; + nsresult rv = NS_NewURI(getter_AddRefs(uri), aSpec); + NS_ENSURE_SUCCESS(rv, rv); + nsCOMPtr channel; - nsresult rv = NS_NewChannel(getter_AddRefs(channel), - aUri, - aLoadingPrincipal, - nsILoadInfo::SEC_NORMAL, - aContentPolicyType, - nullptr, // aLoadGroup - nullptr, // aCallbacks - nsIRequest::LOAD_NORMAL, - aIoService); + rv = NS_NewChannel(getter_AddRefs(channel), + uri, + nsContentUtils::GetSystemPrincipal(), + nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL, + nsIContentPolicy::TYPE_OTHER); NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr in; - rv = channel->Open(getter_AddRefs(in)); + rv = channel->Open2(getter_AddRefs(in)); NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr properties = @@ -1182,30 +1180,6 @@ NS_LoadPersistentPropertiesFromURI(nsIPersistentProperties **outResult, properties.swap(*outResult); return NS_OK; - } - -nsresult -NS_LoadPersistentPropertiesFromURISpec(nsIPersistentProperties **outResult, - const nsACString &aSpec, - nsIPrincipal *aLoadingPrincipal, - nsContentPolicyType aContentPolicyType, - const char *aCharset /* = nullptr */, - nsIURI *aBaseURI /* = nullptr */, - nsIIOService *aIoService /* = nullptr */) -{ - nsCOMPtr uri; - nsresult rv = NS_NewURI(getter_AddRefs(uri), - aSpec, - aCharset, - aBaseURI, - aIoService); - NS_ENSURE_SUCCESS(rv, rv); - - return NS_LoadPersistentPropertiesFromURI(outResult, - uri, - aLoadingPrincipal, - aContentPolicyType, - aIoService); } bool diff --git a/netwerk/base/nsNetUtil.h b/netwerk/base/nsNetUtil.h index b75e793d84a..3bebd80ae75 100644 --- a/netwerk/base/nsNetUtil.h +++ b/netwerk/base/nsNetUtil.h @@ -599,21 +599,9 @@ nsresult NS_ReadInputStreamToString(nsIInputStream *aInputStream, #endif -nsresult -NS_LoadPersistentPropertiesFromURI(nsIPersistentProperties **outResult, - nsIURI *aUri, - nsIPrincipal *aLoadingPrincipal, - nsContentPolicyType aContentPolicyType, - nsIIOService *aIoService = nullptr); - nsresult NS_LoadPersistentPropertiesFromURISpec(nsIPersistentProperties **outResult, - const nsACString &aSpec, - nsIPrincipal *aLoadingPrincipal, - nsContentPolicyType aContentPolicyType, - const char *aCharset = nullptr, - nsIURI *aBaseURI = nullptr, - nsIIOService *aIoService = nullptr); + const nsACString &aSpec); /** * NS_QueryNotificationCallbacks implements the canonical algorithm for