Bug 1038756: Callsites creating a channel in /extensions/ (r=ehsan)

This commit is contained in:
Christoph Kerschbaumer 2014-09-21 09:46:02 -07:00
parent 7a5f6bc06f
commit f754248cc9

View File

@ -19,6 +19,7 @@
#include "nsIPromptService.h"
#include "nsIServiceManager.h"
#include "nsIStringBundle.h"
#include "nsContentUtils.h"
#include "nsCRT.h"
#include "nspr.h"
#include <algorithm>
@ -279,7 +280,17 @@ nsresult nsAutoConfig::downloadAutoConfig()
PR_LOG(MCD, PR_LOG_DEBUG, ("running MCD url %s\n", mConfigURL.get()));
// open a channel for the url
rv = NS_NewChannel(getter_AddRefs(channel),url, nullptr, nullptr, nullptr, nsIRequest::INHIBIT_PERSISTENT_CACHING | nsIRequest::LOAD_BYPASS_CACHE);
rv = NS_NewChannel(getter_AddRefs(channel),
url,
nsContentUtils::GetSystemPrincipal(),
nsILoadInfo::SEC_NORMAL,
nsIContentPolicy::TYPE_OTHER,
nullptr, // aChannelPolicy
nullptr, // loadGroup
nullptr, // aCallbacks
nsIRequest::INHIBIT_PERSISTENT_CACHING |
nsIRequest::LOAD_BYPASS_CACHE);
if (NS_FAILED(rv))
return rv;