# HG changeset patch # User Frank-Rainer Grahl # Date 1502424780 -7200 # Node ID 5a44a25a7d82ed1954b6eb994eab2a8155ac1e34 # Parent c693dd5bc546eab6fd1a3d507482263e91e63c09 Bug 1389475 - Port Bug 1387790: Replace decodeImageData with decodeImage in SeaMonkey. r=jorgk diff --git a/suite/modules/WindowsPreviewPerTab.jsm b/suite/modules/WindowsPreviewPerTab.jsm --- a/suite/modules/WindowsPreviewPerTab.jsm +++ b/suite/modules/WindowsPreviewPerTab.jsm @@ -81,19 +81,18 @@ function _imageFromURI(uri, privateMode, channel.setPrivate(privateMode); } catch (e) { // Ignore channels which do not support nsIPrivateBrowsingChannel. } NetUtil.asyncFetch(channel, function(inputStream, resultCode) { if (!Components.isSuccessCode(resultCode)) return; try { - let out_img = { value: null }; - imgTools.decodeImageData(inputStream, channel.contentType, out_img); - callback(out_img.value); + let out_img = imgTools.decodeImage(inputStream, channel.contentType); + callback(out_img); } catch (e) { // We failed, so use the default favicon (only if this wasn't the default // favicon). let defaultURI = PlacesUtils.favicons.defaultFavicon; if (!defaultURI.equals(uri)) _imageFromURI(defaultURI, privateMode, callback); } });