Commit a33b8803 authored by Łukasz Anforowicz's avatar Łukasz Anforowicz Committed by Commit Bot

Revert "|request_initiator_site_lock| enforcement - attempt #1."

This reverts commit f0f00c0c.

Reason for revert: Caused https://crbug.com/1027094

Original change's description:
> |request_initiator_site_lock| enforcement - attempt #1.
>
> This CL starts treating |request_initiator| that doesn't match
> |request_initiator_site_lock| as a bad IPC message and ignoring such
> malformed resource requests.
>
> NetworkService.URLLoader.RequestInitiatorOriginLockCompatibility UMA is
> non-zero in recent Canary releases.  We expect that this CL will get
> reverted after gathering sufficient number of DumpWithoutCrashing
> reports to understand why the lock doesn't match the initiator in some
> real world scenarios.
>
> Bug: 920634
> Change-Id: I509ebade1d64e5c5243150df8c3f5184273cf8ac
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1661114
> Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
> Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#717031}

TBR=toyoshim@chromium.org,yhirano@chromium.org,hiroshige@chromium.org,lukasza@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 920634, 1027094
Change-Id: I3ea5d8f2f770a3e329de6b1902c2e24bbea1745a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1928560
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: default avatarTakashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: default avatarŁukasz Anforowicz <lukasza@chromium.org>
Cr-Commit-Position: refs/heads/master@{#717731}
parent c34462d2
......@@ -235,12 +235,9 @@ bool CorsURLLoaderFactory::IsSane(const NetworkContext* context,
case InitiatorLockCompatibility::kIncorrectLock:
// Requests from the renderer need to always specify a correct initiator.
NOTREACHED();
debug::ScopedOriginCrashKey initiator_lock_crash_key(
debug::GetRequestInitiatorSiteLockCrashKey(),
request_initiator_site_lock_);
mojo::ReportBadMessage(
"CorsURLLoaderFactory: lock VS initiator mismatch");
return false;
// TODO(lukasza): https://crbug.com/920634: Report bad message and return
// false below.
break;
}
if (context) {
......
......@@ -28,12 +28,6 @@ base::debug::CrashKeyString* GetRequestInitiatorCrashKey() {
} // namespace
base::debug::CrashKeyString* GetRequestInitiatorSiteLockCrashKey() {
static auto* crash_key = base::debug::AllocateCrashKeyString(
"request_initiator_site_lock", base::debug::CrashKeySize::Size64);
return crash_key;
}
ScopedOriginCrashKey::ScopedOriginCrashKey(
base::debug::CrashKeyString* crash_key,
const base::Optional<url::Origin>& value)
......
......@@ -15,8 +15,6 @@ struct ResourceRequest;
namespace debug {
base::debug::CrashKeyString* GetRequestInitiatorSiteLockCrashKey();
class ScopedOriginCrashKey : public base::debug::ScopedCrashKeyString {
public:
ScopedOriginCrashKey(base::debug::CrashKeyString* crash_key,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment