diff options
author | JustOff <Off.Just.Off@gmail.com> | 2018-04-17 23:16:20 +0300 |
---|---|---|
committer | JustOff <Off.Just.Off@gmail.com> | 2018-04-17 23:16:20 +0300 |
commit | b702c9adcae7234c3806a9c1fd3414ff8ecef066 (patch) | |
tree | 0f705483420ecbe5c2b9e796dd4d65dd14121247 /toolkit | |
parent | 29de8de78c3260aad1e7844933d5b3cf1033627c (diff) | |
download | UXP-b702c9adcae7234c3806a9c1fd3414ff8ecef066.tar UXP-b702c9adcae7234c3806a9c1fd3414ff8ecef066.tar.gz UXP-b702c9adcae7234c3806a9c1fd3414ff8ecef066.tar.lz UXP-b702c9adcae7234c3806a9c1fd3414ff8ecef066.tar.xz UXP-b702c9adcae7234c3806a9c1fd3414ff8ecef066.zip |
Use asyncOpen2 instead of asyncOpen everywhere in Pale Moon
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/mozapps/extensions/internal/XPIProvider.jsm | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/toolkit/mozapps/extensions/internal/XPIProvider.jsm b/toolkit/mozapps/extensions/internal/XPIProvider.jsm index 2c5e3dfa7..72a460e4a 100644 --- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm +++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm @@ -1931,12 +1931,10 @@ this.XPIProvider = { let chan; try { - chan = Services.io.newChannelFromURI2(aURI, - null, // aLoadingNode - Services.scriptSecurityManager.getSystemPrincipal(), - null, // aTriggeringPrincipal - Ci.nsILoadInfo.SEC_NORMAL, - Ci.nsIContentPolicy.TYPE_OTHER); + chan = NetUtil.newChannel({ + uri: aURI, + loadUsingSystemPrincipal: true + }); } catch (ex) { return null; @@ -5456,21 +5454,17 @@ AddonInstall.prototype = { let requireBuiltIn = Preferences.get(PREF_INSTALL_REQUIREBUILTINCERTS, true); this.badCertHandler = new BadCertHandler(!requireBuiltIn); - this.channel = NetUtil.newChannel2(this.sourceURI, - null, - null, - null, // aLoadingNode - Services.scriptSecurityManager.getSystemPrincipal(), - null, // aTriggeringPrincipal - Ci.nsILoadInfo.SEC_NORMAL, - Ci.nsIContentPolicy.TYPE_OTHER); + this.channel = NetUtil.newChannel({ + uri: this.sourceURI, + 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.asyncOpen(listener, null); + this.channel.asyncOpen2(listener); Services.obs.addObserver(this, "network:offline-about-to-go-offline", false); } |