[tbb-commits] [tor-browser/tor-browser-82.0-10.0-1] Revert "Bug 40171: Make WebRequest and GeckoWebExecutor First-Party aware"
sysrqb at torproject.org
sysrqb at torproject.org
Sun Nov 8 20:43:26 UTC 2020
commit 26749388416ac42a196d60aef0f4f9597460938c
Author: Matthew Finkel <sysrqb at torproject.org>
Date: Sun Nov 8 20:41:38 2020 +0000
Revert "Bug 40171: Make WebRequest and GeckoWebExecutor First-Party aware"
This reverts commit 9d609e98a6ea20a3a4f01c86ee3a53a2a7f33f47.
---
.../main/java/org/mozilla/geckoview/WebRequest.java | 18 ------------------
widget/android/WebExecutorSupport.cpp | 10 ----------
2 files changed, 28 deletions(-)
diff --git a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/WebRequest.java b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/WebRequest.java
index 18f56abeec43..7e3aa285c5be 100644
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/WebRequest.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/WebRequest.java
@@ -49,11 +49,6 @@ public class WebRequest extends WebMessage {
*/
public final @Nullable String referrer;
- /**
- * The value of the origin of this request.
- */
- public final @Nullable String origin;
-
@Retention(RetentionPolicy.SOURCE)
@IntDef({CACHE_MODE_DEFAULT, CACHE_MODE_NO_STORE,
CACHE_MODE_RELOAD, CACHE_MODE_NO_CACHE,
@@ -115,7 +110,6 @@ public class WebRequest extends WebMessage {
method = builder.mMethod;
cacheMode = builder.mCacheMode;
referrer = builder.mReferrer;
- origin = builder.mOrigin;
if (builder.mBody != null) {
body = builder.mBody.asReadOnlyBuffer();
@@ -132,7 +126,6 @@ public class WebRequest extends WebMessage {
/* package */ String mMethod = "GET";
/* package */ int mCacheMode = CACHE_MODE_DEFAULT;
/* package */ String mReferrer;
- /* package */ String mOrigin;
/**
* Construct a Builder instance with the specified URI.
@@ -212,17 +205,6 @@ public class WebRequest extends WebMessage {
return this;
}
- /**
- * Set the origin URI.
- *
- * @param origin A URI String
- * @return This Builder instance.
- */
- public @NonNull Builder origin(final @Nullable String origin) {
- mOrigin = origin;
- return this;
- }
-
/**
* @return A {@link WebRequest} constructed with the values from this Builder instance.
*/
diff --git a/widget/android/WebExecutorSupport.cpp b/widget/android/WebExecutorSupport.cpp
index 60ab02c03354..dc428e34c10c 100644
--- a/widget/android/WebExecutorSupport.cpp
+++ b/widget/android/WebExecutorSupport.cpp
@@ -383,16 +383,6 @@ nsresult WebExecutorSupport::CreateStreamLoader(
MOZ_ASSERT(cookieJarSettings);
nsCOMPtr<nsILoadInfo> loadInfo = channel->LoadInfo();
-
- RefPtr<nsIURI> originUri;
- const auto origin = req->Origin();
- if (origin) {
- rv = NS_NewURI(getter_AddRefs(originUri), origin->ToString());
- NS_ENSURE_SUCCESS(rv, NS_ERROR_MALFORMED_URI);
- OriginAttributes attrs = loadInfo->GetOriginAttributes();
- attrs.SetFirstPartyDomain(true, originUri);
- loadInfo->SetOriginAttributes(attrs);
- }
loadInfo->SetCookieJarSettings(cookieJarSettings);
// setup http/https specific things
More information about the tbb-commits
mailing list