Commit 2638a6e6 authored by Mugdha Lakhani's avatar Mugdha Lakhani Committed by Commit Bot

Revert "[Prefetch]: DCHECK if recursive prefetch token is set incorrectly"

This reverts commit b344652b.
Reason for revert: We have collected enough crashdumps now, and this is
causing crash metrics to be skewed as it's getting counted as a real
crash.

Bug: 1132770
Change-Id: Ia2e7a92bea2ebeca01c62ca9af73d3fe014685f6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2505985
Auto-Submit: Mugdha Lakhani <nator@chromium.org>
Commit-Queue: Charlie Harrison <csharrison@chromium.org>
Reviewed-by: default avatarCharlie Harrison <csharrison@chromium.org>
Cr-Commit-Position: refs/heads/master@{#822189}
parent 69031573
......@@ -5,7 +5,6 @@
#include "content/browser/loader/prefetch_url_loader_service.h"
#include "base/bind.h"
#include "base/debug/dump_without_crashing.h"
#include "base/feature_list.h"
#include "base/time/default_tick_clock.h"
#include "content/browser/loader/prefetch_url_loader.h"
......@@ -28,14 +27,6 @@
#include "third_party/blink/public/common/renderer_preferences/renderer_preferences.h"
#include "third_party/blink/public/mojom/loader/resource_load_info.mojom-shared.h"
namespace {
void DumpWithoutCrashing(const network::ResourceRequest& request) {
DEBUG_ALIAS_FOR_GURL(prefetch_buf, request.url);
DEBUG_ALIAS_FOR_GURL(initiator_buf, request.request_initiator->GetURL());
base::debug::DumpWithoutCrashing();
}
} // namespace
namespace content {
struct PrefetchURLLoaderService::BindContext {
......@@ -170,18 +161,9 @@ void PrefetchURLLoaderService::CreateLoaderAndStart(
// Recursive prefetch from a cross-origin main resource prefetch.
if (resource_request.recursive_prefetch_token) {
// A request's |recursive_prefetch_token| is only provided if the request is
// a recursive prefetch. This means it is expected that the current
// context's |cross_origin_factory| was already created.
// TODO(crbug.com/1123715): Figure out why we're seeing this condition hold
// true in the field.
if (!current_context.cross_origin_factory) {
// This could happen due to a compromised renderer passing in a recursive
// prefetch token for a request that's not a recursive prefetch. Cancel
// the request.
DVLOG(1) << "Recursive prefetch token unexpectedly set.";
DumpWithoutCrashing(resource_request);
mojo::Remote<network::mojom::URLLoaderClient>(std::move(client))
->OnComplete(
network::URLLoaderCompletionStatus(net::ERR_INVALID_ARGUMENT));
return;
}
......@@ -195,8 +177,6 @@ void PrefetchURLLoaderService::CreateLoaderAndStart(
// a request in a special way. We'll cancel the request.
if (isolation_info_iterator ==
current_context.prefetch_isolation_infos.end()) {
DVLOG(1) << "Recursive prefetch request is missing prefetch isolation";
DumpWithoutCrashing(resource_request);
mojo::Remote<network::mojom::URLLoaderClient>(std::move(client))
->OnComplete(
network::URLLoaderCompletionStatus(net::ERR_INVALID_ARGUMENT));
......
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