Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(823)

Issue 10378005: Add more variables to the URLRequest leak assertion crash dumps. (Closed)

Created:
8 years, 7 months ago by willchan no longer on Chromium
Modified:
8 years, 7 months ago
Reviewers:
eroman
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

Add more variables to the URLRequest leak assertion crash dumps. BUG=90971 TEST=none Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=135261

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -2 lines) Patch
M net/url_request/url_request.h View 2 chunks +3 lines, -2 lines 0 comments Download
M net/url_request/url_request_context.cc View 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
willchan no longer on Chromium
8 years, 7 months ago (2012-05-04 01:00:18 UTC) #1
eroman
8 years, 7 months ago (2012-05-04 01:04:15 UTC) #2
LGTM

On Thu, May 3, 2012 at 6:00 PM, <willchan@chromium.org> wrote:

> Reviewers: eroman,
>
> Description:
> Add more variables to the URLRequest leak assertion crash dumps.
>
> BUG=90971
> TEST=none
>
>
> Please review this at
https://chromiumcodereview.**appspot.com/10378005/<https://chromiumcodereview...
>
> SVN Base:
svn://svn.chromium.org/chrome/**trunk/src<http://svn.chromium.org/chrome/trunk/src>
>
> Affected files:
>  M net/url_request/url_request.h
>  M net/url_request/url_request_**context.cc
>
>
> Index: net/url_request/url_request.h
> diff --git a/net/url_request/url_request.**h
> b/net/url_request/url_request.**h
> index 958f6ab273ae4ee83b68f51f04061f**a3485578ec..**
> bff16d727a52b80ed80c10865811b2**5b5f205e89 100644
> --- a/net/url_request/url_request.**h
> +++ b/net/url_request/url_request.**h
> @@ -589,6 +589,9 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public
> base::NonThreadSafe),
>   // unit tests outside of net :(.
>   URLRequestJob* job() { return job_; }
>
> +  // TODO(willchan): Undo this. Only temporarily public.
> +  bool has_delegate() const { return delegate_ != NULL; }
> +
>  protected:
>   // Allow the URLRequestJob class to control the is_pending() flag.
>   void set_is_pending(bool value) { is_pending_ = value; }
> @@ -663,8 +666,6 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public
> base::NonThreadSafe),
>   // occurs.
>   void NotifyResponseStarted();
>
> -  bool has_delegate() const { return delegate_ != NULL; }
> -
>   // These functions delegate to |delegate_| and may only be used if
>   // |delegate_| is not NULL. See URLRequest::Delegate for the meaning
>   // of these functions.
> Index: net/url_request/url_request_**context.cc
> diff --git a/net/url_request/url_request_**context.cc
> b/net/url_request/url_request_**context.cc
> index 1076f001275f6d4382fb42820536c0**6179683737..**
> 08cf95a143bceefdbe19b15445e31e**d433104867 100644
> --- a/net/url_request/url_request_**context.cc
> +++ b/net/url_request/url_request_**context.cc
> @@ -75,8 +75,12 @@ void URLRequestContext::**AssertNoURLRequests() const {
>     char url_buf[128];
>     const URLRequest* request = *url_requests_->begin();
>     base::strlcpy(url_buf, request->url().spec().c_str(),
> arraysize(url_buf));
> +    bool has_delegate = request->has_delegate();
> +    int load_flags = request->load_flags();
>     base::debug::Alias(url_buf);
>     base::debug::Alias(&num_**requests);
> +    base::debug::Alias(&has_**delegate);
> +    base::debug::Alias(&load_**flags);
>     CHECK(false);
>   }
>  }
>
>
>

Powered by Google App Engine
This is Rietveld 408576698