Browse Source

More bug 1222008 related patches

Ian Neal 5 months ago
parent
commit
51e189f879

+ 31 - 0
mozilla-release/patches/1416629-PARTIAL-59a1.patch

@@ -0,0 +1,31 @@
+# HG changeset patch
+# User Tom Tung <shes050117@gmail.com>
+# Date 1510796739 -28800
+# Node ID c6f9187b0b2e9c42f5eeca898bf81640174573fe
+# Parent  caf05067b8bb2b2df7e5d34b170556e1fdfac25a
+Bug 1416629: Add a telemetry to get how many precentage of synthesized cors response for same-origin mode request. r=bkelly, data-r=francois
+
+diff --git a/dom/workers/ServiceWorkerEvents.cpp b/dom/workers/ServiceWorkerEvents.cpp
+--- a/dom/workers/ServiceWorkerEvents.cpp
++++ b/dom/workers/ServiceWorkerEvents.cpp
+@@ -664,16 +664,20 @@ RespondWithHandler::ResolvedCallback(JSC
+   nsCString responseURL;
+   if (response->Type() == ResponseType::Opaque) {
+     responseURL = ir->GetUnfilteredURL();
+     if (NS_WARN_IF(responseURL.IsEmpty())) {
+       return;
+     }
+   }
+ 
++  if (mRequestMode == RequestMode::Same_origin &&
++      response->Type() == ResponseType::Cors) {
++  }
++
+   UniquePtr<RespondWithClosure> closure(new RespondWithClosure(mInterceptedChannel,
+                                                                mRegistration,
+                                                                mRequestURL,
+                                                                mRespondWithScriptSpec,
+                                                                mRespondWithLineNumber,
+                                                                mRespondWithColumnNumber));
+ 
+   nsCOMPtr<nsIRunnable> startRunnable = new StartResponse(mInterceptedChannel,

+ 29 - 0
mozilla-release/patches/1443850-1-61a1.patch

@@ -0,0 +1,29 @@
+# HG changeset patch
+# User Ben Kelly <ben@wanderview.com>
+# Date 1521458940 -7200
+# Node ID a17d9a6aee914f7737a949bbd3fdc738c357c549
+# Parent  a5e7168378fe25ab203b93594c6119996d8fe19c
+Bug 1443850 P1 Don't try to apply the request fragment to an empty response URL when perform service worker interception. r=asuth
+
+diff --git a/dom/workers/ServiceWorkerEvents.cpp b/dom/workers/ServiceWorkerEvents.cpp
+--- a/dom/workers/ServiceWorkerEvents.cpp
++++ b/dom/workers/ServiceWorkerEvents.cpp
+@@ -691,17 +691,17 @@ RespondWithHandler::ResolvedCallback(JSC
+     responseURL = ir->GetUnfilteredURL();
+ 
+     // Similar to how we apply the request fragment to redirects automatically
+     // we also want to apply it automatically when propagating the response
+     // URL from a service worker interception.  Currently response.url strips
+     // the fragment, so this will never conflict with an existing fragment
+     // on the response.  In the future we will have to check for a response
+     // fragment and avoid overriding in that case.
+-    if (!mRequestFragment.IsEmpty()) {
++    if (!mRequestFragment.IsEmpty() && !responseURL.IsEmpty()) {
+       MOZ_ASSERT(!responseURL.Contains('#'));
+       responseURL.Append(NS_LITERAL_CSTRING("#"));
+       responseURL.Append(mRequestFragment);
+     }
+   }
+ 
+   UniquePtr<RespondWithClosure> closure(new RespondWithClosure(mInterceptedChannel,
+                                                                mRegistration,

+ 2 - 0
mozilla-release/patches/series

@@ -482,6 +482,7 @@ NOBUG-20170803-promisehelper-57a1.patch
 1420273-59a1.patch
 1420272-59a1.patch
 1294873-59a1.patch
+1416629-PARTIAL-59a1.patch
 1419407-59a1.patch
 1405350-59a1.patch
 1416928-1-59a1.patch
@@ -3068,6 +3069,7 @@ servo-20351-61a1.patch
 1446571-3c-61a1.patch
 1446571-3d-61a1.patch
 1446571-3e-61a1.patch
+1443850-1-61a1.patch
 1444541-61a1.patch
 1446588-61a1.patch
 1447450-61a1.patch