Permalink
Browse files

Bug 600620 - followup: fix typo in aboutSupport.js - r=jmuizelaar, a=…

…blocking2.0-beta7

--HG--
branch : GECKO20b7pre_20101006_RELBRANCH
  • Loading branch information...
1 parent 51b1123 commit f749d9c04bf47eec7fbc1511695eba0d23914d27 Benoit Jacob committed Oct 8, 2010
Showing with 19 additions and 6 deletions.
  1. +19 −6 toolkit/content/aboutSupport.js
View
25 toolkit/content/aboutSupport.js
@@ -153,9 +153,13 @@ function populateGraphicsSection() {
let bundle = Services.strings.createBundle("chrome://global/locale/aboutSupport.properties");
let graphics_tbody = document.getElementById("graphics-tbody");
+ var gfxInfo = null;
try {
// nsIGfxInfo is currently only implemented on Windows
- let gfxInfo = Cc["@mozilla.org/gfx/info;1"].getService(Ci.nsIGfxInfo);
+ gfxInfo = Cc["@mozilla.org/gfx/info;1"].getService(Ci.nsIGfxInfo);
+ } catch(e) {}
+
+ if (gfxInfo) {
let trGraphics = [];
trGraphics.push(createParentElement("tr", [
createHeader(bundle.GetStringFromName("adapterDescription")),
@@ -191,17 +195,27 @@ function populateGraphicsSection() {
var d2dEnabled = gfxInfo.D2DEnabled;
var d2dMessage = d2dEnabled;
if (!d2dEnabled) {
- var d2dStatus = gfxInfo.getFeatureStatus(gfxgfxInfoInfo.FEATURE_DIRECT2D);
+ var d2dStatus = -1; // different from any status value defined in the IDL
+ try {
+ d2dStatus = gfxInfo.getFeatureStatus(gfxInfo.FEATURE_DIRECT2D);
+ } catch(e) {
+ window.dump(e + '\n');
+ }
if (d2dStatus == gfxInfo.FEATURE_BLOCKED_DEVICE ||
d2dStatus == gfxInfo.FEATURE_DISCOURAGED)
{
d2dMessage = bundle.GetStringFromName("blockedGraphicsCard");
}
else if (d2dStatus == gfxInfo.FEATURE_BLOCKED_DRIVER_VERSION)
{
- var d2dSuggestedDriverVersion = gfxInfo.getFeatureSuggestedDriverVersion(gfxInfo.FEATURE_DIRECT2D);
+ var d2dSuggestedDriverVersion = null;
+ try {
+ gfxInfo.getFeatureSuggestedDriverVersion(gfxInfo.FEATURE_DIRECT2D);
+ } catch(e) {
+ window.dump(e + '\n');
+ }
if (d2dSuggestedDriverVersion) {
- d2dMessage += bundle.GetStringFromName("tryNewerDriverVersion").replace("%1", d2dSuggestedDriverVersion);
+ d2dMessage = bundle.GetStringFromName("tryNewerDriverVersion").replace("%1", d2dSuggestedDriverVersion);
}
}
}
@@ -217,8 +231,7 @@ function populateGraphicsSection() {
appendChildren(graphics_tbody, trGraphics);
- } catch (e) {
- }
+ } // end if (gfxInfo)
let windows = Services.ww.getWindowEnumerator();
let acceleratedWindows = 0;

0 comments on commit f749d9c

Please sign in to comment.