зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1300543 - IconDownloader.downloadAndDecodeImage(): Correctly assign and close stream. r=ahunt
MozReview-Commit-ID: CYEOCCpraOr --HG-- extra : rebase_source : f0e05c79c531857d73ca5aea3f1dbabedeed6e23
This commit is contained in:
Родитель
10fdd6498e
Коммит
58d250abaa
|
@ -99,7 +99,8 @@ public class IconDownloader implements IconLoader {
|
|||
|
||||
// Decode the image from the fetched response.
|
||||
try {
|
||||
return decodeImageFromResponse(context, connection.getInputStream(), connection.getHeaderFieldInt("Content-Length", -1));
|
||||
stream = connection.getInputStream();
|
||||
return decodeImageFromResponse(context, stream, connection.getHeaderFieldInt("Content-Length", -1));
|
||||
} finally {
|
||||
// Close the stream and free related resources.
|
||||
IOUtils.safeStreamClose(stream);
|
||||
|
|
Загрузка…
Ссылка в новой задаче