Chromium Code Reviews| Index: base/callback_internal.cc |
| diff --git a/base/callback_internal.cc b/base/callback_internal.cc |
| index 3a665d28cae8fc6d5280acad88313de0a8a8ec41..a760f0664c214a7c504f448da5ef224e66f129c2 100644 |
| --- a/base/callback_internal.cc |
| +++ b/base/callback_internal.cc |
| @@ -74,9 +74,8 @@ bool CallbackBase<CopyMode::MoveOnly>::EqualsInternal( |
| return bind_state_ == other.bind_state_; |
| } |
| -CallbackBase<CopyMode::MoveOnly>::CallbackBase( |
| - BindStateBase* bind_state) |
| - : bind_state_(bind_state) { |
| +CallbackBase<CopyMode::MoveOnly>::CallbackBase(BindStateBase* bind_state) |
| + : bind_state_(bind_state ? AdoptRef(bind_state) : nullptr) { |
|
dcheng
2017/03/30 21:15:25
Can you remind me when we would bind a null state
tzik
2017/03/31 13:30:59
It's null when it's called from the default constr
|
| DCHECK(!bind_state_.get() || bind_state_->HasOneRef()); |
| } |