Bug 1504159 - use TYPE_SAVEAS_DOWNLOAD for data saved through nsIWebBrowserPersist, r=jkt a=jcristau
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Fri, 09 Nov 2018 10:53:40 +0000
changeset 498434 a9a646d4a15837e3e19f4f68253f953de3c30cbd
parent 498433 460e0094d65cc620e1e9a0f6eaf1ecc1838cc0ba
child 498435 1c5b308487dcd3b785d5f910ea4b736e8aad0bf1
push id10159
push userncsoregi@mozilla.com
push dateSun, 11 Nov 2018 18:41:31 +0000
treeherdermozilla-beta@aca73ccfac91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjkt, jcristau
bugs1504159
milestone64.0
Bug 1504159 - use TYPE_SAVEAS_DOWNLOAD for data saved through nsIWebBrowserPersist, r=jkt a=jcristau Differential Revision: https://phabricator.services.mozilla.com/D11411
dom/webbrowserpersist/nsWebBrowserPersist.cpp
--- a/dom/webbrowserpersist/nsWebBrowserPersist.cpp
+++ b/dom/webbrowserpersist/nsWebBrowserPersist.cpp
@@ -1353,17 +1353,17 @@ nsresult nsWebBrowserPersist::SaveURIInt
     }
 
     // Open a channel to the URI
     nsCOMPtr<nsIChannel> inputChannel;
     rv = NS_NewChannel(getter_AddRefs(inputChannel),
                        aURI,
                        aTriggeringPrincipal,
                        nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
-                       nsIContentPolicy::TYPE_OTHER,
+                       nsIContentPolicy::TYPE_SAVEAS_DOWNLOAD,
                        nullptr,  // aPerformanceStorage
                        nullptr,  // aLoadGroup
                        static_cast<nsIInterfaceRequestor*>(this),
                        loadFlags);
 
     nsCOMPtr<nsIPrivateBrowsingChannel> pbChannel = do_QueryInterface(inputChannel);
     if (pbChannel)
     {