зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1038756: Callsites creating a channel in /intl/ (r=smontagu)
This commit is contained in:
Родитель
cc097997d2
Коммит
b297c5a069
|
@ -11,6 +11,7 @@
|
|||
#include "hnjalloc.h"
|
||||
#undef FILE // Undo the damage done in hnjalloc.h
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsContentUtils.h"
|
||||
|
||||
#define BUFSIZE 1024
|
||||
|
||||
|
@ -36,7 +37,12 @@ hnjFopen(const char* aURISpec, const char* aMode)
|
|||
}
|
||||
|
||||
nsCOMPtr<nsIInputStream> instream;
|
||||
rv = NS_OpenURI(getter_AddRefs(instream), uri);
|
||||
rv = NS_OpenURI(getter_AddRefs(instream),
|
||||
uri,
|
||||
nsContentUtils::GetSystemPrincipal(),
|
||||
nsILoadInfo::SEC_NORMAL,
|
||||
nsIContentPolicy::TYPE_OTHER);
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "nsTextFormatter.h"
|
||||
#include "nsIErrorService.h"
|
||||
#include "nsICategoryManager.h"
|
||||
#include "nsContentUtils.h"
|
||||
|
||||
// for async loading
|
||||
#ifdef ASYNC_LOADING
|
||||
|
@ -70,7 +71,12 @@ nsStringBundle::LoadProperties()
|
|||
|
||||
// We don't use NS_OpenURI because we want to tweak the channel
|
||||
nsCOMPtr<nsIChannel> channel;
|
||||
rv = NS_NewChannel(getter_AddRefs(channel), uri);
|
||||
rv = NS_NewChannel(getter_AddRefs(channel),
|
||||
uri,
|
||||
nsContentUtils::GetSystemPrincipal(),
|
||||
nsILoadInfo::SEC_NORMAL,
|
||||
nsIContentPolicy::TYPE_OTHER);
|
||||
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
// It's a string bundle. We expect a text/plain type, so set that as hint
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsAppDirectoryServiceDefs.h"
|
||||
#include "nsContentUtils.h"
|
||||
|
||||
// first we need a simple class which wraps a nsIPropertyElement and
|
||||
// cuts out the leading URL from the key
|
||||
|
@ -148,7 +149,12 @@ nsStringBundleTextOverride::Init()
|
|||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsCOMPtr<nsIInputStream> in;
|
||||
rv = NS_OpenURI(getter_AddRefs(in), uri);
|
||||
rv = NS_OpenURI(getter_AddRefs(in),
|
||||
uri,
|
||||
nsContentUtils::GetSystemPrincipal(),
|
||||
nsILoadInfo::SEC_NORMAL,
|
||||
nsIContentPolicy::TYPE_OTHER);
|
||||
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
static NS_DEFINE_CID(kPersistentPropertiesCID, NS_IPERSISTENTPROPERTIES_CID);
|
||||
|
|
Загрузка…
Ссылка в новой задаче