diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-04 20:54:20 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-04 20:54:20 +0000 |
commit | eab9d01a2f673428cf1b8633e0a88697ae688408 (patch) | |
tree | c3796aad7c4ef9dcd559b759e7ca9386ca3554c7 /sync/internal_api/public/util | |
parent | 35e10e96455d71f04bf4756872290cc3563e74e7 (diff) | |
download | chromium_src-eab9d01a2f673428cf1b8633e0a88697ae688408.zip chromium_src-eab9d01a2f673428cf1b8633e0a88697ae688408.tar.gz chromium_src-eab9d01a2f673428cf1b8633e0a88697ae688408.tar.bz2 |
Fix even more remaining uses of WeakPtr<T>'s operator T* conversion
These cases weren't caught by the automated pass and/or needed to be
solved in another way than using .get().
BUG=245942
TBR=darin@chromium.org
Review URL: https://codereview.chromium.org/16226028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204036 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/internal_api/public/util')
-rw-r--r-- | sync/internal_api/public/util/weak_handle.h | 10 | ||||
-rw-r--r-- | sync/internal_api/public/util/weak_handle_unittest.cc | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/sync/internal_api/public/util/weak_handle.h b/sync/internal_api/public/util/weak_handle.h index c299be7..24fccbc 100644 --- a/sync/internal_api/public/util/weak_handle.h +++ b/sync/internal_api/public/util/weak_handle.h @@ -208,7 +208,7 @@ class WeakHandleCore template <typename U> void DoCall0(void (U::*fn)(void)) const { CHECK(IsOnOwnerThread()); - if (!Get()) { + if (!Get().get()) { return; } (Get().get()->*fn)(); @@ -218,7 +218,7 @@ class WeakHandleCore void DoCall1(void (U::*fn)(A1), typename ParamTraits<A1>::ForwardType a1) const { CHECK(IsOnOwnerThread()); - if (!Get()) { + if (!Get().get()) { return; } (Get().get()->*fn)(a1); @@ -229,7 +229,7 @@ class WeakHandleCore typename ParamTraits<A1>::ForwardType a1, typename ParamTraits<A2>::ForwardType a2) const { CHECK(IsOnOwnerThread()); - if (!Get()) { + if (!Get().get()) { return; } (Get().get()->*fn)(a1, a2); @@ -241,7 +241,7 @@ class WeakHandleCore typename ParamTraits<A2>::ForwardType a2, typename ParamTraits<A3>::ForwardType a3) const { CHECK(IsOnOwnerThread()); - if (!Get()) { + if (!Get().get()) { return; } (Get().get()->*fn)(a1, a2, a3); @@ -254,7 +254,7 @@ class WeakHandleCore typename ParamTraits<A3>::ForwardType a3, typename ParamTraits<A4>::ForwardType a4) const { CHECK(IsOnOwnerThread()); - if (!Get()) { + if (!Get().get()) { return; } (Get().get()->*fn)(a1, a2, a3, a4); diff --git a/sync/internal_api/public/util/weak_handle_unittest.cc b/sync/internal_api/public/util/weak_handle_unittest.cc index 56dfe7f..c8ba1ef 100644 --- a/sync/internal_api/public/util/weak_handle_unittest.cc +++ b/sync/internal_api/public/util/weak_handle_unittest.cc @@ -97,7 +97,7 @@ TEST_F(WeakHandleTest, InitializedAfterDestroy) { h = b.AsWeakHandle(); } EXPECT_TRUE(h.IsInitialized()); - EXPECT_FALSE(h.Get()); + EXPECT_FALSE(h.Get().get()); } TEST_F(WeakHandleTest, InitializedAfterInvalidate) { @@ -105,7 +105,7 @@ TEST_F(WeakHandleTest, InitializedAfterInvalidate) { WeakHandle<Base> h = b.AsWeakHandle(); b.Kill(); EXPECT_TRUE(h.IsInitialized()); - EXPECT_FALSE(h.Get()); + EXPECT_FALSE(h.Get().get()); } TEST_F(WeakHandleTest, Call) { |