Index: net/url_request/url_request.cc |
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc |
index cff804c8e6e2a20b138b3f57165938455dc8c417..7f43261d9470a07a2131b7471ccc0e7023577b7b 100644 |
--- a/net/url_request/url_request.cc |
+++ b/net/url_request/url_request.cc |
@@ -8,11 +8,14 @@ |
#include "base/bind_helpers.h" |
#include "base/callback.h" |
#include "base/compiler_specific.h" |
+#include "base/debug/alias.h" |
+#include "base/debug/dump_without_crashing.h" |
#include "base/debug/stack_trace.h" |
#include "base/lazy_instance.h" |
#include "base/memory/singleton.h" |
#include "base/message_loop/message_loop.h" |
#include "base/profiler/scoped_tracker.h" |
+#include "base/rand_util.h" |
#include "base/stl_util.h" |
#include "base/strings/utf_string_conversions.h" |
#include "base/synchronization/lock.h" |
@@ -682,6 +685,24 @@ void URLRequest::CancelWithSSLError(int error, const SSLInfo& ssl_info) { |
void URLRequest::DoCancel(int error, const SSLInfo& ssl_info) { |
DCHECK(error < 0); |
+ // ~500,000 ERR_ABORTED < 100ms in Canary channel a day. Sample .01% to get |
+ // ~50 reports a day. |
+ // TODO(csharrison) Remove this code when crbug.com/557430 is resolved. |
+ int64 request_time = |
+ (base::TimeTicks::Now() - creation_time_).InMilliseconds(); |
+ if (error == ERR_ABORTED && request_time <= 100 && |
+ load_flags_ & LOAD_MAIN_FRAME && base::RandDouble() < .0001) { |
+ static int dump_times = 0; |
eroman
2015/11/23 23:29:05
This works on the assumption that URLRequest is on
mmenke
2015/11/23 23:32:58
I'm not in favor of adding more places that assume
|
+ if (dump_times < 5) { |
+ char url_copy[256] = {0}; |
+ base::debug::Alias(&url_copy); |
eroman
2015/11/23 23:29:05
No need to alias twice (done below as well)
|
+ strncpy(url_copy, url().spec().c_str(), sizeof(url_copy)); |
+ base::debug::Alias(&url_copy); |
+ base::debug::Alias(&request_time); |
+ base::debug::DumpWithoutCrashing(); |
+ dump_times++; |
+ } |
+ } |
// If cancelled while calling a delegate, clear delegate info. |
if (calling_delegate_) { |
LogUnblocked(); |