Backed out changeset 46eadccf444d (bug 1223435)

This commit is contained in:
Nigel Babu 2015-11-16 16:03:18 +05:30
parent 48a17dbb0e
commit 70eb23339b

View File

@ -2410,11 +2410,12 @@ this.XPIProvider = {
let chan;
try {
chan = NetUtil.newChannel({
uri: aURI,
loadUsingSystemPrincipal: true,
securityFlags: Ci.nsILoadInfo.SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL
});
chan = Services.io.newChannelFromURI2(aURI,
null, // aLoadingNode
Services.scriptSecurityManager.getSystemPrincipal(),
null, // aTriggeringPrincipal
Ci.nsILoadInfo.SEC_NORMAL,
Ci.nsIContentPolicy.TYPE_OTHER);
}
catch (ex) {
return null;
@ -5413,16 +5414,14 @@ AddonInstall.prototype = {
this.channel = NetUtil.newChannel({
uri: this.sourceURI,
loadUsingSystemPrincipal: true,
securityFlags: Ci.nsILoadInfo.SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL
});
loadUsingSystemPrincipal: true});
this.channel.notificationCallbacks = this;
if (this.channel instanceof Ci.nsIHttpChannel) {
this.channel.setRequestHeader("Moz-XPI-Update", "1", true);
if (this.channel instanceof Ci.nsIHttpChannelInternal)
this.channel.forceAllowThirdPartyCookie = true;
}
this.channel.asyncOpen2(listener);
this.channel.asyncOpen(listener, null);
Services.obs.addObserver(this, "network:offline-about-to-go-offline", false);
}