Bug 1433037 - WindowsPreviewPerTab should use decodeImageAsync. r=aosmond, a=RyanVM
authorAndrea Marchesini <amarchesini@mozilla.com>
Mon, 26 Mar 2018 17:59:11 +0200
changeset 462901 1a6f6fdaa772538a85509ff524da1bf6ed3d44c3
parent 462900 8b2c7b0546e96f508fc2608f3cc8a627518948d2
child 462902 0db4e4e9ce11ba8310d7691cc13e235117d74e76
push id1683
push usersfraser@mozilla.com
push dateThu, 26 Apr 2018 16:43:40 +0000
treeherdermozilla-release@5af6cb21869d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaosmond, RyanVM
bugs1433037
milestone60.0
Bug 1433037 - WindowsPreviewPerTab should use decodeImageAsync. r=aosmond, a=RyanVM
browser/modules/WindowsPreviewPerTab.jsm
--- a/browser/modules/WindowsPreviewPerTab.jsm
+++ b/browser/modules/WindowsPreviewPerTab.jsm
@@ -96,18 +96,18 @@ function _imageFromURI(uri, privateMode,
         }
 
         callback(image);
       }
     };
 
     try {
       let threadManager = Cc["@mozilla.org/thread-manager;1"].getService();
-      imgTools.decodeImage(inputStream, channel.contentType, decodeCallback,
-                           threadManager.currentThread);
+      imgTools.decodeImageAsync(inputStream, channel.contentType,
+                                decodeCallback, threadManager.currentThread);
     } 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);
     }
   });