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

Unified Diff: net/url_request/url_request_context_getter.cc

Issue 2702083002: Print creator's call-stack on URLRequestContextGetter leak in Debug. (Closed)
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/url_request/url_request_context_getter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_context_getter.cc
diff --git a/net/url_request/url_request_context_getter.cc b/net/url_request/url_request_context_getter.cc
index 0bad74812804739ecd53fae8180316ed33213818..7163f48fd265ff79e286cbce224a5a4271c21d61 100644
--- a/net/url_request/url_request_context_getter.cc
+++ b/net/url_request/url_request_context_getter.cc
@@ -40,8 +40,10 @@ void URLRequestContextGetter::OnDestruct() const {
// Can't force-delete the object here, because some derived classes
// can only be deleted on the owning thread, so just emit a warning to
// aid in debugging.
+#if !defined(NDEBUG)
Ryan Sleevi 2017/02/22 19:45:57 Did you mean to remove this logging for !NDEBUG bu
Wez 2017/02/22 22:18:42 This is already a DLOG(), so compiles to a void st
DLOG(WARNING) << "URLRequestContextGetter leaking due to no owning"
- << " thread.";
+ << " thread. Created at: " << created_at.ToString();
+#endif // !defined(NDEBUG)
// Let LSan know we know this is a leak. https://crbug.com/594130
ANNOTATE_LEAKING_OBJECT_PTR(this);
}
« no previous file with comments | « net/url_request/url_request_context_getter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698