Bug 1519902 - Use current document for imageCache.findEntryProperties(). r=IanN a=IanN
authorFrank-Rainer Grahl <frgrahl@gmx.net>
Mon, 14 Jan 2019 23:23:48 +0100
changeset 28306 659c9551e19da6a7a719e656ea8d899f53152ea7
parent 28304 2cb6da32d02e059f48bfc73864855d057fa73b62
child 28309 3636dfc6f54f123fa9437c38c94d1e0fcc5abd71
push id2131
push userfrgrahl@gmx.net
push dateMon, 14 Jan 2019 22:52:00 +0000
treeherdercomm-esr52@659c9551e19d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersIanN, IanN
bugs1519902, 1202085
Bug 1519902 - Use current document for imageCache.findEntryProperties(). r=IanN a=IanN Port Bug 1202085 part 2 [Do not store images that have been synthesized by a service worker in the image cache].
suite/common/nsContextMenu.js
--- a/suite/common/nsContextMenu.js
+++ b/suite/common/nsContextMenu.js
@@ -76,17 +76,17 @@ nsContextMenu.prototype = {
 
     var contentType = null;
     var contentDisposition = null;
     if (this.onImage) {
       try {
         let imageCache = Components.classes["@mozilla.org/image/tools;1"]
                                    .getService(Components.interfaces.imgITools)
                                    .getImgCacheForDocument(doc);
-        let props = imageCache.findEntryProperties(popupNode.currentURI);
+        let props = imageCache.findEntryProperties(popupNode.currentURI, doc);
         if (props) {
           let nsISupportsCString = Components.interfaces.nsISupportsCString;
           contentType = props.get("type", nsISupportsCString).data;
           try {
             contentDisposition = props.get("content-disposition",
                                            nsISupportsCString).data;
           } catch (e) {}
         }