Bug 1211255 - fix downloads on fennec, r=mak, a=sylvestre
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Mon, 05 Oct 2015 13:55:22 +0100
changeset 298026 f17a4df0e8172720d053418e6d064348b3da3fa4
parent 298025 1501dc3ad3c354ac5e1291ddc35d50d8285a84da
child 298027 928f4a4cf0f34b888f8c7ef49adaac196d2ec03a
push id962
push userjlund@mozilla.com
push dateFri, 04 Dec 2015 23:28:54 +0000
treeherdermozilla-release@23a2d286e80f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak, sylvestre
bugs1211255
milestone43.0a2
Bug 1211255 - fix downloads on fennec, r=mak, a=sylvestre
toolkit/mozapps/downloads/DownloadUtils.jsm
--- a/toolkit/mozapps/downloads/DownloadUtils.jsm
+++ b/toolkit/mozapps/downloads/DownloadUtils.jsm
@@ -478,17 +478,17 @@ this.DownloadUtils = {
     // 0 -> 0; 1.2 -> 1.2; 12.3 -> 12.3; 123.4 -> 123; 234.5 -> 235
     // added in bug 462064: (unitIndex != 0) makes sure that no decimal digit for bytes appears when aBytes < 100
     let fractionDigits = (aBytes > 0) && (aBytes < 100) && (unitIndex != 0) ? 1 : 0;
 
     // Don't try to format Infinity values using NumberFormat.
     if (aBytes === Infinity) {
       aBytes = "Infinity";
     } else {
-      if (Intl) {
+      if (typeof Intl != "undefined") {
         aBytes = getLocaleNumberFormat(fractionDigits)
                    .format(aBytes);
       } else if (gDecimalSymbol != ".") {
         // FIXME: Fall back to the old hack, will be fixed in bug 1200494.
         aBytes = aBytes.toFixed(fractionDigits).replace(".", gDecimalSymbol);
       }
     }