Bug 1519902 - Use current document for imageCache.findEntryProperties(). r=IanN
authorFrank-Rainer Grahl <frgrahl@gmx.net>
Mon, 14 Jan 2019 23:49:44 +0100
changeset 33343 54b1c3f11dee
parent 33342 5efd0e02c927
child 33344 4c5966ac10c4
push id2368
push userclokep@gmail.com
push dateMon, 28 Jan 2019 21:12:50 +0000
treeherdercomm-beta@56d23c07d815 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersIanN
bugs1519902, 1202085
Bug 1519902 - Use current document for imageCache.findEntryProperties(). r=IanN Port Bug 1202085 part 2 [Do not store images that have been synthesized by a service worker in the image cache].
suite/base/content/nsContextMenu.js
--- a/suite/base/content/nsContextMenu.js
+++ b/suite/base/content/nsContextMenu.js
@@ -84,17 +84,17 @@ nsContextMenu.prototype = {
 
     var contentType = null;
     var contentDisposition = null;
     if (this.onImage) {
       try {
         let imageCache = Cc["@mozilla.org/image/tools;1"]
                            .getService(Ci.imgITools)
                            .getImgCacheForDocument(doc);
-        let props = imageCache.findEntryProperties(popupNode.currentURI);
+        let props = imageCache.findEntryProperties(popupNode.currentURI, doc);
         if (props) {
           let nsISupportsCString = Ci.nsISupportsCString;
           contentType = props.get("type", nsISupportsCString).data;
           try {
             contentDisposition = props.get("content-disposition",
                                            nsISupportsCString).data;
           } catch (e) {}
         }