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

Unified Diff: base/callback_internal.cc

Issue 2317563002: Move CallbackBase::polymorphic_invoke_ into BindStateBase (Closed)
Patch Set: rebase Created 4 years, 3 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/callback_internal.h ('k') | base/callback_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/callback_internal.cc
diff --git a/base/callback_internal.cc b/base/callback_internal.cc
index 24b44272e0b6a8f3cfeb5f2eae0c152868217d7b..ad88894e2685ec84c03a53c4647adfe8195b1719 100644
--- a/base/callback_internal.cc
+++ b/base/callback_internal.cc
@@ -24,7 +24,6 @@ CallbackBase<CopyMode::MoveOnly>&
CallbackBase<CopyMode::MoveOnly>::operator=(CallbackBase&& c) = default;
void CallbackBase<CopyMode::MoveOnly>::Reset() {
- polymorphic_invoke_ = nullptr;
// NULL the bind_state_ last, since it may be holding the last ref to whatever
// object owns us, and we may be deleted after that.
bind_state_ = nullptr;
@@ -32,11 +31,7 @@ void CallbackBase<CopyMode::MoveOnly>::Reset() {
bool CallbackBase<CopyMode::MoveOnly>::EqualsInternal(
const CallbackBase& other) const {
- // Ignore |polymorphic_invoke_| value in null case.
- if (!bind_state_ || !other.bind_state_)
- return bind_state_ == other.bind_state_;
- return bind_state_ == other.bind_state_ &&
- polymorphic_invoke_ == other.polymorphic_invoke_;
+ return bind_state_ == other.bind_state_;
}
CallbackBase<CopyMode::MoveOnly>::CallbackBase(
@@ -51,7 +46,6 @@ CallbackBase<CopyMode::Copyable>::CallbackBase(
const CallbackBase& c)
: CallbackBase<CopyMode::MoveOnly>(nullptr) {
bind_state_ = c.bind_state_;
- polymorphic_invoke_ = c.polymorphic_invoke_;
}
CallbackBase<CopyMode::Copyable>::CallbackBase(CallbackBase&& c) = default;
@@ -59,7 +53,6 @@ CallbackBase<CopyMode::Copyable>::CallbackBase(CallbackBase&& c) = default;
CallbackBase<CopyMode::Copyable>&
CallbackBase<CopyMode::Copyable>::operator=(const CallbackBase& c) {
bind_state_ = c.bind_state_;
- polymorphic_invoke_ = c.polymorphic_invoke_;
return *this;
}
« no previous file with comments | « base/callback_internal.h ('k') | base/callback_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698