Commit 92675c52 authored by John Abd-El-Malek's avatar John Abd-El-Malek Committed by Commit Bot

Revert "URLLoader: add debug info to catch a leak again."

This reverts commit 6296e827.

Reason for revert: don't need this data anymore.

Original change's description:
> URLLoader: add debug info to catch a leak again.
> 
> This time with a DumpWithoutCrashing
> 
> Bug: 901405
> Change-Id: Ie2a075afe384e3dc13fde076a558d5d90591ab92
> Reviewed-on: https://chromium-review.googlesource.com/c/1330076
> Reviewed-by: John Abd-El-Malek <jam@chromium.org>
> Commit-Queue: Maks Orlovich <morlovich@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#606987}

TBR=jam@chromium.org,morlovich@chromium.org

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

Bug: 901405
Change-Id: I82f5d55758a82a15072ee42b335071da36785521
Reviewed-on: https://chromium-review.googlesource.com/c/1440505Reviewed-by: default avatarMaks Orlovich <morlovich@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#626795}
parent 07163ceb
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
#include "base/bind.h" #include "base/bind.h"
#include "base/bind_helpers.h" #include "base/bind_helpers.h"
#include "base/command_line.h" #include "base/command_line.h"
#include "base/debug/alias.h"
#include "base/debug/dump_without_crashing.h"
#include "base/files/file.h" #include "base/files/file.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
...@@ -52,16 +50,12 @@ ...@@ -52,16 +50,12 @@
namespace network { namespace network {
namespace { namespace {
constexpr size_t kDefaultAllocationSize = 512 * 1024; constexpr size_t kDefaultAllocationSize = 512 * 1024;
// Cannot use 0, because this means "default" in // Cannot use 0, because this means "default" in
// mojo::core::Core::CreateDataPipe // mojo::core::Core::CreateDataPipe
constexpr size_t kBlockedBodyAllocationSize = 1; constexpr size_t kBlockedBodyAllocationSize = 1;
// Used to dump when we get too many requests, once.
bool g_reported_too_many_requests = false;
// TODO: this duplicates some of PopulateResourceResponse in // TODO: this duplicates some of PopulateResourceResponse in
// content/browser/loader/resource_loader.cc // content/browser/loader/resource_loader.cc
void PopulateResourceResponse(net::URLRequest* request, void PopulateResourceResponse(net::URLRequest* request,
...@@ -445,18 +439,6 @@ URLLoader::URLLoader( ...@@ -445,18 +439,6 @@ URLLoader::URLLoader(
if (keepalive_ && keepalive_statistics_recorder_) if (keepalive_ && keepalive_statistics_recorder_)
keepalive_statistics_recorder_->OnLoadStarted(factory_params_->process_id); keepalive_statistics_recorder_->OnLoadStarted(factory_params_->process_id);
// Record some debug info in hope of tracing down leaks.
int32_t annotation_hash =
url_request_->traffic_annotation().unique_id_hash_code;
size_t num_running_requests = url_request_context_->url_requests()->size();
base::debug::Alias(&annotation_hash);
base::debug::Alias(&num_running_requests);
DEBUG_ALIAS_FOR_GURL(url_buf, url_request_->url());
if (!g_reported_too_many_requests && num_running_requests > 10000) {
g_reported_too_many_requests = true;
base::debug::DumpWithoutCrashing();
}
// Resolve elements from request_body and prepare upload data. // Resolve elements from request_body and prepare upload data.
if (request.request_body.get()) { if (request.request_body.get()) {
OpenFilesForUpload(request); OpenFilesForUpload(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