mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-22 07:07:30 +09:00
Issue #65 - Remove AppConstants from netwerk/
This commit is contained in:
parent
b73780a36d
commit
ef27cc7fd0
2 changed files with 9 additions and 10 deletions
|
|
@ -10,7 +10,6 @@ const Ci = Components.interfaces;
|
||||||
const Cc = Components.classes;
|
const Cc = Components.classes;
|
||||||
const Cu = Components.utils;
|
const Cu = Components.utils;
|
||||||
|
|
||||||
Cu.import("resource://gre/modules/AppConstants.jsm");
|
|
||||||
Cu.import("resource://gre/modules/Services.jsm");
|
Cu.import("resource://gre/modules/Services.jsm");
|
||||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
|
|
||||||
|
|
@ -144,13 +143,14 @@ this.UserAgentUpdates = {
|
||||||
// try to load next one if the previous load failed
|
// try to load next one if the previous load failed
|
||||||
return prevLoad ? prevLoad.then(null, tryNext) : tryNext();
|
return prevLoad ? prevLoad.then(null, tryNext) : tryNext();
|
||||||
}, null).then(null, (ex) => {
|
}, null).then(null, (ex) => {
|
||||||
if (AppConstants.platform !== "android") {
|
#ifndef MOZ_WIDGET_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);
|
|
||||||
}
|
|
||||||
// Make one last attempt to read from the Fennec APK root.
|
// Make one last attempt to read from the Fennec APK root.
|
||||||
return readChannel("resource://android/" + FILE_UPDATES);
|
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) => {
|
}).then((update) => {
|
||||||
// Apply update if loading was successful
|
// Apply update if loading was successful
|
||||||
this._applyUpdate(update);
|
this._applyUpdate(update);
|
||||||
|
|
|
||||||
|
|
@ -99,10 +99,9 @@ IPDL_SOURCES += [
|
||||||
'PHttpChannel.ipdl',
|
'PHttpChannel.ipdl',
|
||||||
]
|
]
|
||||||
|
|
||||||
EXTRA_JS_MODULES += [
|
EXTRA_JS_MODULES += ['UserAgentOverrides.jsm']
|
||||||
'UserAgentOverrides.jsm',
|
|
||||||
'UserAgentUpdates.jsm',
|
EXTRA_PP_JS_MODULES += ['UserAgentUpdates.jsm']
|
||||||
]
|
|
||||||
|
|
||||||
include('/ipc/chromium/chromium-config.mozbuild')
|
include('/ipc/chromium/chromium-config.mozbuild')
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue