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

Unified Diff: base/memory/weak_ptr.cc

Issue 2961083002: Move base::WeakPtr's null ctor out-of-line (Closed)
Patch Set: rebase Created 3 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 | « base/memory/weak_ptr.h ('k') | base/memory/weak_ptr_unittest.nc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/weak_ptr.cc
diff --git a/base/memory/weak_ptr.cc b/base/memory/weak_ptr.cc
index 04c9ad65299f76bdf1ee39f92d81127da5fe6f21..2467abee4078ff64cf219710a95d811e052a0e5b 100644
--- a/base/memory/weak_ptr.cc
+++ b/base/memory/weak_ptr.cc
@@ -71,14 +71,12 @@ void WeakReferenceOwner::Invalidate() {
flag_ = WeakReference::Flag::NullFlag();
}
-WeakPtrBase::WeakPtrBase() {
-}
+WeakPtrBase::WeakPtrBase() : ptr_(0) {}
-WeakPtrBase::~WeakPtrBase() {
-}
+WeakPtrBase::~WeakPtrBase() {}
-WeakPtrBase::WeakPtrBase(const WeakReference& ref) : ref_(ref) {
-}
+WeakPtrBase::WeakPtrBase(const WeakReference& ref, uintptr_t ptr)
+ : ref_(ref), ptr_(ptr) {}
WeakPtrFactoryBase::WeakPtrFactoryBase(uintptr_t ptr) : ptr_(ptr) {}
« no previous file with comments | « base/memory/weak_ptr.h ('k') | base/memory/weak_ptr_unittest.nc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698