Bug 1686616 - make IO use Components instead of Services. r=kmag

Differential Revision: https://phabricator.services.mozilla.com/D105530
This commit is contained in:
Alexis Beingessner 2021-02-18 13:26:32 +00:00
Родитель ddff243f3c
Коммит 3f1a425606
7 изменённых файлов: 12 добавлений и 11 удалений

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

@ -29,6 +29,7 @@
#include "nsIAppStartup.h"
#include "nsIObserverService.h"
#include "mozilla/Components.h"
#include "mozilla/Preferences.h"
#include "nsIResProtocolHandler.h"
#include "nsIScriptError.h"
@ -632,7 +633,7 @@ void nsChromeRegistryChrome::ManifestResource(ManifestProcessingContext& cx,
EnsureLowerCase(package);
nsDependentCString host(package);
nsCOMPtr<nsIIOService> io = mozilla::services::GetIOService();
nsCOMPtr<nsIIOService> io = mozilla::components::IO::Service();
if (!io) {
NS_WARNING("No IO service trying to process chrome manifests");
return;

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

@ -953,7 +953,7 @@ void Navigator::CheckProtocolHandlerAllowed(const nsAString& aScheme,
}
nsCOMPtr<nsIProtocolHandler> handler;
nsCOMPtr<nsIIOService> io = services::GetIOService();
nsCOMPtr<nsIIOService> io = components::IO::Service();
if (NS_FAILED(
io->GetProtocolHandler(scheme.get(), getter_AddRefs(handler)))) {
raisePermissionDeniedScheme();

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

@ -10,6 +10,7 @@
#include "nsNetUtil.h"
#include "mozilla/Atomics.h"
#include "mozilla/Components.h"
#include "mozilla/Encoding.h"
#include "mozilla/LoadContext.h"
#include "mozilla/LoadInfo.h"
@ -116,7 +117,7 @@ using mozilla::dom::ServiceWorkerDescriptor;
#define MAX_RECURSION_COUNT 50
already_AddRefed<nsIIOService> do_GetIOService(nsresult* error /* = 0 */) {
nsCOMPtr<nsIIOService> io = mozilla::services::GetIOService();
nsCOMPtr<nsIIOService> io = mozilla::components::IO::Service();
if (error) *error = io ? NS_OK : NS_ERROR_FAILURE;
return io.forget();
}
@ -1195,7 +1196,7 @@ void NS_GetReferrerFromChannel(nsIChannel* channel, nsIURI** referrer) {
}
already_AddRefed<nsINetUtil> do_GetNetUtil(nsresult* error /* = 0 */) {
nsCOMPtr<nsIIOService> io = mozilla::services::GetIOService();
nsCOMPtr<nsIIOService> io = mozilla::components::IO::Service();
nsCOMPtr<nsINetUtil> util;
if (io) util = do_QueryInterface(io);

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

@ -16,7 +16,7 @@
#include <utility>
#include "NullHttpTransaction.h"
#include "mozilla/Services.h"
#include "mozilla/Components.h"
#include "mozilla/SpinEventLoopUntil.h"
#include "mozilla/Telemetry.h"
#include "mozilla/Unused.h"
@ -93,7 +93,7 @@ nsHttpConnectionMgr::~nsHttpConnectionMgr() {
nsresult nsHttpConnectionMgr::EnsureSocketThreadTarget() {
nsCOMPtr<nsIEventTarget> sts;
nsCOMPtr<nsIIOService> ioService = services::GetIOService();
nsCOMPtr<nsIIOService> ioService = components::IO::Service();
if (ioService) {
nsCOMPtr<nsISocketTransportService> realSTS =
services::GetSocketTransportService();

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

@ -528,7 +528,7 @@ bool UrlClassifierCommon::IsAllowListed(nsIChannel* aChannel) {
"check allowlisting test domain on channel %p",
aChannel));
nsCOMPtr<nsIIOService> ios = services::GetIOService();
nsCOMPtr<nsIIOService> ios = components::IO::Service();
if (NS_WARN_IF(!ios)) {
return false;
}

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

@ -6,7 +6,7 @@
#include "mozilla/NullPrincipal.h"
#include "mozilla/ScopeExit.h"
#include "mozilla/Services.h"
#include "mozilla/Components.h"
#include "nsFaviconService.h"
#include "nsIChannel.h"
#include "nsIFaviconService.h"
@ -56,7 +56,7 @@ NS_IMETHODIMP DefaultFaviconObserver::OnStopRequest(nsIRequest*, nsresult) {
static nsresult MakeDefaultFaviconChannel(nsIURI* aURI, nsILoadInfo* aLoadInfo,
nsIChannel** aOutChannel) {
nsCOMPtr<nsIIOService> ios = mozilla::services::GetIOService();
nsCOMPtr<nsIIOService> ios = mozilla::components::IO::Service();
nsCOMPtr<nsIChannel> chan;
nsCOMPtr<nsIURI> defaultFaviconURI;

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

@ -21,7 +21,6 @@
#include "mozilla/LinkedList.h"
#include "mozilla/Preferences.h"
#include "mozilla/ResultExtensions.h"
#include "mozilla/Services.h"
#include "mozilla/URLPreloader.h"
#include "mozilla/Unused.h"
#include "mozilla/ErrorResult.h"
@ -226,7 +225,7 @@ static bool ParseJSON(JSContext* cx, nsACString& jsonData,
}
static Result<nsCOMPtr<nsIZipReaderCache>, nsresult> GetJarCache() {
nsCOMPtr<nsIIOService> ios = services::GetIOService();
nsCOMPtr<nsIIOService> ios = components::IO::Service();
NS_ENSURE_TRUE(ios, Err(NS_ERROR_FAILURE));
nsCOMPtr<nsIProtocolHandler> jarProto;