author | Felipe Gomes <felipc@gmail.com> |
Thu, 19 Apr 2012 18:47:56 -0700 | |
changeset 91971 | 22bfdebf5cae295b3aa946406d7654c356b55801 |
parent 91970 | ebec7bc561e1905612befb1d07292903e702472c |
child 91978 | cd8b66649278a03fc9bfff2e52422c9c7e7d8338 |
push id | 22495 |
push user | felipc@gmail.com |
push date | Fri, 20 Apr 2012 01:49:42 +0000 |
treeherder | mozilla-central@22bfdebf5cae [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | gavin, desktop-only |
bugs | 746369 |
milestone | 14.0a1 |
first release with | nightly linux32
22bfdebf5cae
/
14.0a1
/
20120420030653
/
files
nightly linux64
22bfdebf5cae
/
14.0a1
/
20120420030653
/
files
nightly mac
22bfdebf5cae
/
14.0a1
/
20120420030653
/
files
nightly win32
22bfdebf5cae
/
14.0a1
/
20120420030653
/
files
nightly win64
22bfdebf5cae
/
14.0a1
/
20120420030653
/
files
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
releases | nightly linux32
14.0a1
/
20120420030653
/
pushlog to previous
nightly linux64
14.0a1
/
20120420030653
/
pushlog to previous
nightly mac
14.0a1
/
20120420030653
/
pushlog to previous
nightly win32
14.0a1
/
20120420030653
/
pushlog to previous
nightly win64
14.0a1
/
20120420030653
/
pushlog to previous
|
--- a/browser/modules/WebappsIconHelpers.js +++ b/browser/modules/WebappsIconHelpers.js @@ -11,19 +11,23 @@ * aIcons = { * "16": "http://www.example.org/icon16.png", * "32": "http://www.example.org/icon32.png" * }; * * @returns the URL string for the largest specified icon */ function getBiggestIconURL(aIcons) { + if (!aIcons) { + return "chrome://browser/skin/webapps-64.png"; + } + let iconSizes = Object.keys(aIcons); if (iconSizes.length == 0) { - return ""; + return "chrome://browser/skin/webapps-64.png"; } iconSizes.sort(function(a, b) a - b); return aIcons[iconSizes.pop()]; } /** * This function retrieves the icon for an app as specified * in the iconURI on the shell object. @@ -58,17 +62,17 @@ function getIconForApp(aShell, callback) if(aShell.useTmpForIcon) { let downloadObserver = { onDownloadComplete: function(downloader, request, cx, aStatus, file) { // pass downloader just to keep reference around onIconDownloaded(aShell, mimeType, aStatus, file, callback, downloader); } }; - tmpIcon = Services.dirsvc.get("TmpD", Ci.nsIFile); + let tmpIcon = Services.dirsvc.get("TmpD", Ci.nsIFile); tmpIcon.append("tmpicon." + mimeService.getPrimaryExtension(mimeType, "")); tmpIcon.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, 0666); listener = Cc["@mozilla.org/network/downloader;1"] .createInstance(Ci.nsIDownloader); listener.init(downloadObserver, tmpIcon); } else { let pipe = Cc["@mozilla.org/pipe;1"]