mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1099296 - Attach LoadInfo to remaining callers of ioService and ProtocolHandlers - in toolkit/ (r=mmc,mak)
This commit is contained in:
parent
aa5bc08574
commit
1602663505
@ -43,6 +43,10 @@
|
||||
#include "nsThreadUtils.h"
|
||||
#include "nsXPCOMStrings.h"
|
||||
|
||||
#include "nsIContentPolicy.h"
|
||||
#include "nsILoadInfo.h"
|
||||
#include "nsContentUtils.h"
|
||||
|
||||
using mozilla::Preferences;
|
||||
using mozilla::TimeStamp;
|
||||
using mozilla::Telemetry::Accumulate;
|
||||
@ -897,7 +901,15 @@ PendingLookup::SendRemoteQueryInternal()
|
||||
// Set up the channel to transmit the request to the service.
|
||||
nsCOMPtr<nsIChannel> channel;
|
||||
nsCOMPtr<nsIIOService> ios = do_GetService(NS_IOSERVICE_CONTRACTID, &rv);
|
||||
rv = ios->NewChannel(serviceUrl, nullptr, nullptr, getter_AddRefs(channel));
|
||||
rv = ios->NewChannel2(serviceUrl,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr, // aLoadingNode
|
||||
nsContentUtils::GetSystemPrincipal(),
|
||||
nullptr, // aTriggeringPrincipal
|
||||
nsILoadInfo::SEC_NORMAL,
|
||||
nsIContentPolicy::TYPE_OTHER,
|
||||
getter_AddRefs(channel));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIHttpChannel> httpChannel(do_QueryInterface(channel, &rv));
|
||||
|
@ -52,7 +52,7 @@ GetDefaultIcon(nsIChannel **aChannel)
|
||||
defaultIconURI,
|
||||
nsContentUtils::GetSystemPrincipal(),
|
||||
nsILoadInfo::SEC_NORMAL,
|
||||
nsIContentPolicy::TYPE_OTHER);
|
||||
nsIContentPolicy::TYPE_IMAGE);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@ -361,7 +361,7 @@ nsAnnoProtocolHandler::NewFaviconChannel(nsIURI *aURI, nsIURI *aAnnotationURI,
|
||||
inputStream,
|
||||
nsContentUtils::GetSystemPrincipal(),
|
||||
nsILoadInfo::SEC_NORMAL,
|
||||
nsIContentPolicy::TYPE_OTHER);
|
||||
nsIContentPolicy::TYPE_IMAGE);
|
||||
}
|
||||
NS_ENSURE_SUCCESS(rv, GetDefaultIcon(_channel));
|
||||
|
||||
|
@ -27,6 +27,9 @@
|
||||
#include "nsIClassInfoImpl.h"
|
||||
#include "mozilla/ArrayUtils.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "nsILoadInfo.h"
|
||||
#include "nsIContentPolicy.h"
|
||||
#include "nsContentUtils.h"
|
||||
|
||||
// For large favicons optimization.
|
||||
#include "imgITools.h"
|
||||
@ -328,8 +331,15 @@ nsFaviconService::ReplaceFaviconDataFromDataURL(nsIURI* aFaviconURI,
|
||||
rv = ioService->GetProtocolHandler("data", getter_AddRefs(protocolHandler));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsILoadInfo> loadInfo =
|
||||
new mozilla::LoadInfo(nsContentUtils::GetSystemPrincipal(),
|
||||
nullptr, // aTriggeringPrincipal
|
||||
nullptr, // aLoadingNode
|
||||
nsILoadInfo::SEC_NORMAL,
|
||||
nsIContentPolicy::TYPE_IMAGE);
|
||||
|
||||
nsCOMPtr<nsIChannel> channel;
|
||||
rv = protocolHandler->NewChannel(dataURI, getter_AddRefs(channel));
|
||||
rv = protocolHandler->NewChannel2(dataURI, loadInfo, getter_AddRefs(channel));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// Blocking stream is OK for data URIs.
|
||||
|
Loading…
Reference in New Issue
Block a user