diff options
Diffstat (limited to 'toolkit/modules/Troubleshoot.jsm')
-rw-r--r-- | toolkit/modules/Troubleshoot.jsm | 43 |
1 files changed, 28 insertions, 15 deletions
diff --git a/toolkit/modules/Troubleshoot.jsm b/toolkit/modules/Troubleshoot.jsm index 42f3fb809..cea7c8f29 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 @@ -21,12 +20,12 @@ const PREFS_WHITELIST = [ "apz.", "browser.cache.", "browser.display.", + "browser.download.confirmOpenExecutable", "browser.download.folderList", "browser.download.hide_plugins_without_extensions", "browser.download.importedFromSqlite", "browser.download.lastDir.savePerSite", "browser.download.manager.addToRecentDocs", - "browser.download.manager.alertOnEXEOpen", "browser.download.manager.closeWhenDone", "browser.download.manager.displayedHistoryDays", "browser.download.manager.quitBehavior", @@ -56,7 +55,7 @@ const PREFS_WHITELIST = [ "browser.urlbar.", "browser.zoom.", "dom.", - "extensions.checkCompatibility", + "extensions.enableCompatibilityChecking", "extensions.lastAppVersion", "font.", "general.autoScroll", @@ -177,16 +176,23 @@ 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 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"; +#else + data.versionArch = "32-bit"; +#endif try { data.vendor = Services.prefs.getCharPref("app.support.vendor"); @@ -341,18 +347,23 @@ var dataProviders = { QueryInterface(Ci.nsIInterfaceRequestor). getInterface(Ci.nsIDOMWindowUtils) data.supportsHardwareH264 = "Unknown"; - let promise = winUtils.supportsHardwareH264Decoding; - promise.then(function(v) { - data.supportsHardwareH264 = v; - }); - promises.push(promise); + try { + // After restart - data may not be available + let promise = winUtils.supportsHardwareH264Decoding; + promise.then(function(v) { + data.supportsHardwareH264 = v; + }); + promises.push(promise); + } catch (e) {} 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); } @@ -449,7 +460,9 @@ var dataProviders = { // Eagerly free resources. let loseExt = gl.getExtension("WEBGL_lose_context"); - loseExt.loseContext(); + if (loseExt) { + loseExt.loseContext(); + } return contextInfo; |