Index: net/url_request/url_request_http_job.cc |
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc |
index 68858c147586fc902d58c50f946829c46bf543e1..4247d83ce0134ec541b2689d776b58b94b18e8ad 100644 |
--- a/net/url_request/url_request_http_job.cc |
+++ b/net/url_request/url_request_http_job.cc |
@@ -10,6 +10,7 @@ |
#include "base/command_line.h" |
#include "base/compiler_specific.h" |
#include "base/debug/alias.h" |
+#include "base/debug/dump_without_crashing.h" |
#include "base/file_version_info.h" |
#include "base/message_loop/message_loop.h" |
#include "base/metrics/field_trial.h" |
@@ -289,6 +290,12 @@ void URLRequestHttpJob::Start() { |
} |
void URLRequestHttpJob::Kill() { |
+ if (awaiting_callback_) { |
+ // TODO(battre) crbug.com/289715 |
+ // Simulate a crash to see who kills the job while it is waiting for a |
+ // callback. This should not happen, see URLRequest::OrphanJob(). |
+ base::debug::DumpWithoutCrashing(); |
+ } |
if (!transaction_.get()) |
return; |
@@ -1020,6 +1027,11 @@ void URLRequestHttpJob::SetExtraRequestHeaders( |
} |
LoadState URLRequestHttpJob::GetLoadState() const { |
+ // TODO(pkasting): Remove ScopedTracker below once crbug.com/455952 is |
+ // fixed. |
+ tracked_objects::ScopedTracker tracking_profile( |
+ FROM_HERE_WITH_EXPLICIT_FUNCTION( |
+ "455952 URLRequestHttpJob::GetLoadState")); |
return transaction_.get() ? |
transaction_->GetLoadState() : LOAD_STATE_IDLE; |
} |