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

Side by Side Diff: net/url_request/url_request_context.cc

Issue 10914134: Log the source when a URLFetcher leak is detected (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/url_request/url_request_context.h" 5 #include "net/url_request/url_request_context.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/debug/alias.h" 8 #include "base/debug/alias.h"
9 #include "base/debug/stack_trace.h" 9 #include "base/debug/stack_trace.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 bool has_delegate = request->has_delegate(); 89 bool has_delegate = request->has_delegate();
90 int load_flags = request->load_flags(); 90 int load_flags = request->load_flags();
91 base::debug::StackTrace stack_trace(NULL, 0); 91 base::debug::StackTrace stack_trace(NULL, 0);
92 if (request->stack_trace()) 92 if (request->stack_trace())
93 stack_trace = *request->stack_trace(); 93 stack_trace = *request->stack_trace();
94 base::debug::Alias(url_buf); 94 base::debug::Alias(url_buf);
95 base::debug::Alias(&num_requests); 95 base::debug::Alias(&num_requests);
96 base::debug::Alias(&has_delegate); 96 base::debug::Alias(&has_delegate);
97 base::debug::Alias(&load_flags); 97 base::debug::Alias(&load_flags);
98 base::debug::Alias(&stack_trace); 98 base::debug::Alias(&stack_trace);
99 CHECK(false); 99 CHECK(false) << "Leaked " << num_requests << " URLRequest(s). First URL: "
100 << request->url().spec().c_str() << ".";
100 } 101 }
101 } 102 }
102 103
103 } // namespace net 104 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698