Bug 1611728 - pass content policy to webbrowserpersist to improve image request headers. r=frg
authorBill Gianopoulos <wgianopoulos@gmail.com>
Fri, 24 Jan 2020 05:43:23 -0500
changeset 38013 308632c5e7572bdbf04960733b906f49c6e308eb
parent 38012 50d2d44fabf9ddc98412fe59591f9fd416f7db3b
child 38014 c5297b226713a283037a6bfa6becb3748717660e
push id398
push userclokep@gmail.com
push dateMon, 09 Mar 2020 19:10:28 +0000
reviewersfrg
bugs1611728
Bug 1611728 - pass content policy to webbrowserpersist to improve image request headers. r=frg
suite/components/shell/nsMacShellService.cpp
--- a/suite/components/shell/nsMacShellService.cpp
+++ b/suite/components/shell/nsMacShellService.cpp
@@ -170,19 +170,19 @@ nsMacShellService::SetDesktopBackground(
   if (docShell)
   {
     loadContext = do_QueryInterface(docShell);
   }
 
   nsCOMPtr<nsIReferrerInfo> referrerInfo = new mozilla::dom::ReferrerInfo();
   referrerInfo->InitWithNode(aElement);
 
-  return wbp->SaveURI(imageURI, aElement->NodePrincipal(), 0,
-                      referrerInfo, nullptr, nullptr,
-                      mBackgroundFile, loadContext);
+  return wbp->SaveURI(imageURI, aElement->NodePrincipal(), 0, referrerInfo,
+                      nullptr, nullptr, mBackgroundFile,
+                      nsIContentPolicy::TYPE_IMAGE, loadContext);
 }
 
 NS_IMETHODIMP
 nsMacShellService::OnProgressChange(nsIWebProgress* aWebProgress,
                                     nsIRequest* aRequest,
                                     int32_t aCurSelfProgress,
                                     int32_t aMaxSelfProgress,
                                     int32_t aCurTotalProgress,