Commit f725f47c authored by Lukasz Anforowicz's avatar Lukasz Anforowicz Committed by Commit Bot

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

This reverts commit 0724e945.

Reason for revert: https://crbug.com/1056949 (RBS) and https://crbug.com/1059218

Original change's description:
> |request_initiator_site_lock| enforcement - attempt #2.
> 
> 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.  Therefore it is possible
> 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: If4fbdb6336703f53784c036ca5d9e408ff223d78
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2006113
> Auto-Submit: Łukasz Anforowicz <lukasza@chromium.org>
> Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
> Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#739359}

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

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

Bug: 920634
Change-Id: Ief1019a74abf8e70364ad2f6aadc2d2216488910
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2108783Reviewed-by: default avatarŁukasz Anforowicz <lukasza@chromium.org>
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Cr-Commit-Position: refs/heads/master@{#751470}
parent f58d862f
...@@ -310,12 +310,7 @@ bool CorsURLLoaderFactory::IsSane(const NetworkContext* context, ...@@ -310,12 +310,7 @@ bool CorsURLLoaderFactory::IsSane(const NetworkContext* context,
// TODO(lukasza): https://crbug.com/920634: Report bad message and return // TODO(lukasza): https://crbug.com/920634: Report bad message and return
// false below. // false below.
NOTREACHED(); NOTREACHED();
url::debug::ScopedOriginCrashKey initiator_lock_crash_key( break;
debug::GetRequestInitiatorSiteLockCrashKey(),
base::OptionalOrNullptr(request_initiator_site_lock_));
mojo::ReportBadMessage(
"CorsURLLoaderFactory: lock VS initiator mismatch");
return false;
} }
if (context) { if (context) {
......
...@@ -13,7 +13,7 @@ namespace debug { ...@@ -13,7 +13,7 @@ namespace debug {
namespace { namespace {
base::debug::CrashKeyString* GetUrlCrashKey() { base::debug::CrashKeyString* GetRequestUrlCrashKey() {
static auto* crash_key = base::debug::AllocateCrashKeyString( static auto* crash_key = base::debug::AllocateCrashKeyString(
"request_url", base::debug::CrashKeySize::Size256); "request_url", base::debug::CrashKeySize::Size256);
return crash_key; return crash_key;
...@@ -27,15 +27,9 @@ base::debug::CrashKeyString* GetRequestInitiatorCrashKey() { ...@@ -27,15 +27,9 @@ base::debug::CrashKeyString* GetRequestInitiatorCrashKey() {
} // namespace } // namespace
base::debug::CrashKeyString* GetRequestInitiatorSiteLockCrashKey() {
static auto* crash_key = base::debug::AllocateCrashKeyString(
"request_initiator_site_lock", base::debug::CrashKeySize::Size64);
return crash_key;
}
ScopedRequestCrashKeys::ScopedRequestCrashKeys( ScopedRequestCrashKeys::ScopedRequestCrashKeys(
const network::ResourceRequest& request) const network::ResourceRequest& request)
: url_(GetUrlCrashKey(), request.url.possibly_invalid_spec()), : url_(GetRequestUrlCrashKey(), request.url.possibly_invalid_spec()),
request_initiator_(GetRequestInitiatorCrashKey(), request_initiator_(GetRequestInitiatorCrashKey(),
base::OptionalOrNullptr(request.request_initiator)) {} base::OptionalOrNullptr(request.request_initiator)) {}
......
...@@ -15,8 +15,6 @@ struct ResourceRequest; ...@@ -15,8 +15,6 @@ struct ResourceRequest;
namespace debug { namespace debug {
base::debug::CrashKeyString* GetRequestInitiatorSiteLockCrashKey();
class ScopedRequestCrashKeys { class ScopedRequestCrashKeys {
public: public:
ScopedRequestCrashKeys(const network::ResourceRequest& request); ScopedRequestCrashKeys(const network::ResourceRequest& request);
......
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