Bug 1211243 - Do not swallow exceptions if the URI is not an instance of a standard URL. r=florian

This commit is contained in:
Masatoshi Kimura 2016-01-22 07:29:35 +09:00
Родитель b15598ec83
Коммит 262636dacf
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -747,6 +747,7 @@ function saveMedia()
selectSaveFolder(function(aDirectory) {
if (aDirectory) {
var saveAnImage = function(aURIString, aChosenData, aBaseURI) {
uniqueFile(aChosenData.file);
internalSave(aURIString, null, null, null, null, false, "SaveImageTitle",
aChosenData, aBaseURI, null, false, null, gDocInfo.isContentWindowPrivate);
};
@ -762,7 +763,10 @@ function saveMedia()
uri.QueryInterface(Components.interfaces.nsIURL);
dir.append(decodeURIComponent(uri.fileName));
} catch(ex) {
/* data: uris */
// data:/blob: uris
// Supply a dummy filename, otherwise Download Manager
// will try to delete the base directory on failure.
dir.append(gImageView.data[v][COL_IMAGE_TYPE]);
}
if (i == 0) {