diff options
author | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-10 03:14:35 +0000 |
---|---|---|
committer | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-10 03:14:35 +0000 |
commit | 481915a77d8a2d0a968f1963271a13618bea9908 (patch) | |
tree | 40b0ae8b2616cff35cccfa87b3ef21999aad7346 /base/callback.h.pump | |
parent | 81814bce7954f38311b39c488ba076a297458534 (diff) | |
download | chromium_src-481915a77d8a2d0a968f1963271a13618bea9908.zip chromium_src-481915a77d8a2d0a968f1963271a13618bea9908.tar.gz chromium_src-481915a77d8a2d0a968f1963271a13618bea9908.tar.bz2 |
Make Callback.Equals() only work when comparing against the same type.
Previously, we were using the base class's comparator to check equality, which allows us to make comparisons across callbacks of different types. This disallows such a thing.
BUG=none
TEST=New no-compile test.
Review URL: http://codereview.chromium.org/7780016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100565 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/callback.h.pump')
-rw-r--r-- | base/callback.h.pump | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/base/callback.h.pump b/base/callback.h.pump index 3b9aa73..82b643e 100644 --- a/base/callback.h.pump +++ b/base/callback.h.pump @@ -274,6 +274,10 @@ $for ARG , [[typename internal::ParamTraits<A$(ARG)>::ForwardType]]); callback_type_does_not_match_bind_result); } + bool Equals(const Callback& other) const { + return CallbackBase::Equals(other); + } + R Run($for ARG , [[typename internal::ParamTraits<A$(ARG)>::ForwardType a$(ARG)]]) const { PolymorphicInvoke f = |