Bug 1214305 - Part 5: Use the secure upgraded channel URI in FetchEventRunnable::Init; r=jdm
☠☠ backed out by 50b5e58fd4cd ☠ ☠
authorEhsan Akhgari <ehsan@mozilla.com>
Mon, 02 Nov 2015 11:27:00 -0500
changeset 308948 88ab26108f2de6cb3786208f86a8b570085b9b7c
parent 308947 2e3e4f256d4656acd316a6af9a5a9b1e57acce68
child 308949 226c83ca9a2aa4c16e42603d54c2636087e985b2
push id7543
push userpehrsons@gmail.com
push dateMon, 16 Nov 2015 02:58:32 +0000
reviewersjdm
bugs1214305
milestone45.0a1
Bug 1214305 - Part 5: Use the secure upgraded channel URI in FetchEventRunnable::Init; r=jdm This ensures that FetchEvent.request.url will have the correct value for secure upgraded channels.
dom/workers/ServiceWorkerPrivate.cpp
--- a/dom/workers/ServiceWorkerPrivate.cpp
+++ b/dom/workers/ServiceWorkerPrivate.cpp
@@ -969,17 +969,17 @@ public:
   Init()
   {
     AssertIsOnMainThread();
     nsCOMPtr<nsIChannel> channel;
     nsresult rv = mInterceptedChannel->GetChannel(getter_AddRefs(channel));
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsCOMPtr<nsIURI> uri;
-    rv = channel->GetURI(getter_AddRefs(uri));
+    rv = mInterceptedChannel->GetSecureUpgradedChannelURI(getter_AddRefs(uri));
     NS_ENSURE_SUCCESS(rv, rv);
 
     rv = uri->GetSpec(mSpec);
     NS_ENSURE_SUCCESS(rv, rv);
 
     uint32_t loadFlags;
     rv = channel->GetLoadFlags(&loadFlags);
     NS_ENSURE_SUCCESS(rv, rv);