diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-06-13 17:40:52 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-06-13 17:40:52 +0200 |
commit | d3baa6bf1d8451885e240986c0145dee88e065a9 (patch) | |
tree | 26a06cea76748542ddba3d6aa57b5537bba7dbee /toolkit | |
parent | 5e2dcda71d20d5269c7866308dc96b01f577f98a (diff) | |
download | uxp-d3baa6bf1d8451885e240986c0145dee88e065a9.tar.gz |
Add a next preprocessing to Troubleshot.jsm
Issue mcp-graveyard/UXP#65 (partially)
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/modules/Troubleshoot.jsm | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/toolkit/modules/Troubleshoot.jsm b/toolkit/modules/Troubleshoot.jsm index daf6d99e68..82cf7f86c0 100644 --- a/toolkit/modules/Troubleshoot.jsm +++ b/toolkit/modules/Troubleshoot.jsm @@ -10,7 +10,6 @@ const { classes: Cc, interfaces: Ci, utils: Cu } = Components; Cu.import("resource://gre/modules/AddonManager.jsm"); Cu.import("resource://gre/modules/Services.jsm"); -Cu.import("resource://gre/modules/AppConstants.jsm"); // We use a preferences whitelist to make sure we only show preferences that // are useful for support and won't compromise the user's privacy. Note that @@ -177,16 +176,17 @@ var dataProviders = { let data = { name: Services.appinfo.name, osVersion: sysInfo.getProperty("name") + " " + sysInfo.getProperty("version"), - version: AppConstants.MOZ_APP_VERSION_DISPLAY, buildID: Services.appinfo.appBuildID, userAgent: Cc["@mozilla.org/network/protocol;1?name=http"]. getService(Ci.nsIHttpProtocolHandler). userAgent, safeMode: Services.appinfo.inSafeMode, }; +#expand let data.version = "__MOZ_APP_VERSION_DISPLAY__"; - if (AppConstants.MOZ_UPDATER) - data.updateChannel = Cu.import("resource://gre/modules/UpdateUtils.jsm", {}).UpdateUtils.UpdateChannel; +#ifdef MOZ_UPDATER + data.updateChannel = Cu.import("resource://gre/modules/UpdateUtils.jsm", {}).UpdateUtils.UpdateChannel; +#endif #ifdef HAVE_64BIT_BUILD data.versionArch = "64-bit"; @@ -356,9 +356,11 @@ var dataProviders = { data.currentAudioBackend = winUtils.currentAudioBackend; if (!data.numAcceleratedWindows && gfxInfo) { - let win = AppConstants.platform == "win"; - let feature = win ? gfxInfo.FEATURE_DIRECT3D_9_LAYERS : - gfxInfo.FEATURE_OPENGL_LAYERS; +#ifdef XP_WIN + let feature = gfxInfo.FEATURE_DIRECT3D_9_LAYERS; +#else + let feature = gfxInfo.FEATURE_OPENGL_LAYERS; +#endif data.numAcceleratedWindowsMessage = statusMsgForFeature(feature); } |