diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-02-01 21:59:08 -0500 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-04-14 12:25:58 +0200 |
commit | a1c9dd468daa6d729c9d11416fb8a5c2dceb2c88 (patch) | |
tree | afd9ce56e22064102a12177918366b8bdd31c4f0 | |
parent | 0a5acb852a90cade2fa680cf4862fbc2a498ed4e (diff) | |
download | UXP-a1c9dd468daa6d729c9d11416fb8a5c2dceb2c88.tar UXP-a1c9dd468daa6d729c9d11416fb8a5c2dceb2c88.tar.gz UXP-a1c9dd468daa6d729c9d11416fb8a5c2dceb2c88.tar.lz UXP-a1c9dd468daa6d729c9d11416fb8a5c2dceb2c88.tar.xz UXP-a1c9dd468daa6d729c9d11416fb8a5c2dceb2c88.zip |
Issue #65 - Remove AppConstants from netwerk/
-rw-r--r-- | netwerk/protocol/http/UserAgentUpdates.jsm | 12 | ||||
-rw-r--r-- | netwerk/protocol/http/moz.build | 7 |
2 files changed, 9 insertions, 10 deletions
diff --git a/netwerk/protocol/http/UserAgentUpdates.jsm b/netwerk/protocol/http/UserAgentUpdates.jsm index 602705ebe..6b600e592 100644 --- a/netwerk/protocol/http/UserAgentUpdates.jsm +++ b/netwerk/protocol/http/UserAgentUpdates.jsm @@ -10,7 +10,6 @@ const Ci = Components.interfaces; const Cc = Components.classes; const Cu = Components.utils; -Cu.import("resource://gre/modules/AppConstants.jsm"); Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/XPCOMUtils.jsm"); @@ -144,13 +143,14 @@ this.UserAgentUpdates = { // try to load next one if the previous load failed return prevLoad ? prevLoad.then(null, tryNext) : tryNext(); }, null).then(null, (ex) => { - if (AppConstants.platform !== "android") { - // All previous (non-Android) load attempts have failed, so we bail. - throw new Error("UserAgentUpdates: Failed to load " + FILE_UPDATES + - ex + "\n" + ex.stack); - } +#ifndef MOZ_WIDGET_ANDROID // Make one last attempt to read from the Fennec APK root. return readChannel("resource://android/" + FILE_UPDATES); +#else + // All previous (non-Android) load attempts have failed, so we bail. + throw new Error("UserAgentUpdates: Failed to load " + FILE_UPDATES + + ex + "\n" + ex.stack); +#endif }).then((update) => { // Apply update if loading was successful this._applyUpdate(update); diff --git a/netwerk/protocol/http/moz.build b/netwerk/protocol/http/moz.build index 1368ee707..37e801f2f 100644 --- a/netwerk/protocol/http/moz.build +++ b/netwerk/protocol/http/moz.build @@ -99,10 +99,9 @@ IPDL_SOURCES += [ 'PHttpChannel.ipdl', ] -EXTRA_JS_MODULES += [ - 'UserAgentOverrides.jsm', - 'UserAgentUpdates.jsm', -] +EXTRA_JS_MODULES += ['UserAgentOverrides.jsm'] + +EXTRA_PP_JS_MODULES += ['UserAgentUpdates.jsm'] include('/ipc/chromium/chromium-config.mozbuild') |