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

Unified Diff: chrome/browser/net/chrome_url_request_context.h

Issue 16870008: Revert a workaround commit for a UAF crash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 6 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 | « no previous file | chrome/browser/net/chrome_url_request_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/chrome_url_request_context.h
diff --git a/chrome/browser/net/chrome_url_request_context.h b/chrome/browser/net/chrome_url_request_context.h
index 86f09fc84eb5da6e0909d94dc750eda5f3cda74f..db099927979156f2f7aac8f29d10e0a1197a699a 100644
--- a/chrome/browser/net/chrome_url_request_context.h
+++ b/chrome/browser/net/chrome_url_request_context.h
@@ -41,13 +41,15 @@ class ChromeURLRequestContext : public net::URLRequestContext {
virtual ~ChromeURLRequestContext();
base::WeakPtr<ChromeURLRequestContext> GetWeakPtr() {
- return base::AsWeakPtr(this);
+ return weak_factory_.GetWeakPtr();
}
// Copies the state from |other| into this context.
void CopyFrom(ChromeURLRequestContext* other);
private:
+ base::WeakPtrFactory<ChromeURLRequestContext> weak_factory_;
+
// ---------------------------------------------------------------------------
// Important: When adding any new members below, consider whether they need to
// be added to CopyFrom.
« no previous file with comments | « no previous file | chrome/browser/net/chrome_url_request_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698