Bug 1038756: Callsites creating a channel in /embedding/ (r=bz)
authorChristoph Kerschbaumer <mozilla@christophkerschbaumer.com>
Sun, 21 Sep 2014 09:46:16 -0700
changeset 206531 68e95822939bab95edc15f8f0b6d6ee3452102a2
parent 206530 9ddccdec7224192aadd5072b3c36d04f7ffe439e
child 206532 c09922195848f6028138430e2fc8f7a5c95e5731
push id27529
push userryanvm@gmail.com
push dateMon, 22 Sep 2014 19:49:52 +0000
treeherdermozilla-central@f4037194394e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs1038756
milestone35.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1038756: Callsites creating a channel in /embedding/ (r=bz)
embedding/components/webbrowserpersist/nsWebBrowserPersist.cpp
--- a/embedding/components/webbrowserpersist/nsWebBrowserPersist.cpp
+++ b/embedding/components/webbrowserpersist/nsWebBrowserPersist.cpp
@@ -1195,19 +1195,25 @@ nsresult nsWebBrowserPersist::SaveURIInt
         {
             // Assume a plain cache key
             cacheKey = aCacheKey;
         }
     }
 
     // Open a channel to the URI
     nsCOMPtr<nsIChannel> inputChannel;
-    rv = NS_NewChannel(getter_AddRefs(inputChannel), aURI,
-            nullptr, nullptr, static_cast<nsIInterfaceRequestor*>(this),
-            loadFlags);
+    rv = NS_NewChannel(getter_AddRefs(inputChannel),
+                       aURI,
+                       nsContentUtils::GetSystemPrincipal(),
+                       nsILoadInfo::SEC_NORMAL,
+                       nsIContentPolicy::TYPE_OTHER,
+                       nullptr,  // aChannelPolicy
+                       nullptr,  // aLoadGroup
+                       static_cast<nsIInterfaceRequestor*>(this),
+                       loadFlags);
 
     nsCOMPtr<nsIPrivateBrowsingChannel> pbChannel = do_QueryInterface(inputChannel);
     if (pbChannel)
     {
         pbChannel->SetPrivate(aIsPrivate);
     }
 
     if (NS_FAILED(rv) || inputChannel == nullptr)