diff --git a/toolkit/mozapps/downloads/DownloadUtils.jsm b/toolkit/mozapps/downloads/DownloadUtils.jsm index df74b4605f..60fc6e0285 100644 --- a/toolkit/mozapps/downloads/DownloadUtils.jsm +++ b/toolkit/mozapps/downloads/DownloadUtils.jsm @@ -497,14 +497,16 @@ this.DownloadUtils = { // Don't try to format Infinity values using NumberFormat. if (aBytes === Infinity) { aBytes = "Infinity"; - } else if (typeof Intl != "undefined") { - aBytes = getLocaleNumberFormat(fractionDigits) - .format(aBytes); } else { - // FIXME: Fall back to the old hack, will be fixed in bug 1200494. - aBytes = aBytes.toFixed(fractionDigits); - if (gDecimalSymbol != ".") { - aBytes = aBytes.replace(".", gDecimalSymbol); + try { + aBytes = getLocaleNumberFormat(fractionDigits) + .format(aBytes); + } catch(e) { + // FIXME: Fall back to the old hack, will be fixed in bug 1200494. + aBytes = aBytes.toFixed(fractionDigits); + if (gDecimalSymbol != ".") { + aBytes = aBytes.replace(".", gDecimalSymbol); + } } }