Skip to content

Commit 1b388c5

Browse files
Add more variables to the URLRequest leak assertion crash dumps.
BUG=90971 TEST=none Review URL: https://chromiumcodereview.appspot.com/10378005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135261 0039d316-1c4b-4281-b951-d872f2087c98
1 parent 641ed62 commit 1b388c5

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

net/url_request/url_request.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,9 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
589589
// unit tests outside of net :(.
590590
URLRequestJob* job() { return job_; }
591591

592+
// TODO(willchan): Undo this. Only temporarily public.
593+
bool has_delegate() const { return delegate_ != NULL; }
594+
592595
protected:
593596
// Allow the URLRequestJob class to control the is_pending() flag.
594597
void set_is_pending(bool value) { is_pending_ = value; }
@@ -663,8 +666,6 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
663666
// occurs.
664667
void NotifyResponseStarted();
665668

666-
bool has_delegate() const { return delegate_ != NULL; }
667-
668669
// These functions delegate to |delegate_| and may only be used if
669670
// |delegate_| is not NULL. See URLRequest::Delegate for the meaning
670671
// of these functions.

net/url_request/url_request_context.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,12 @@ void URLRequestContext::AssertNoURLRequests() const {
7575
char url_buf[128];
7676
const URLRequest* request = *url_requests_->begin();
7777
base::strlcpy(url_buf, request->url().spec().c_str(), arraysize(url_buf));
78+
bool has_delegate = request->has_delegate();
79+
int load_flags = request->load_flags();
7880
base::debug::Alias(url_buf);
7981
base::debug::Alias(&num_requests);
82+
base::debug::Alias(&has_delegate);
83+
base::debug::Alias(&load_flags);
8084
CHECK(false);
8185
}
8286
}

0 commit comments

Comments
 (0)