Commit caf87444 authored by ricea's avatar ricea Committed by Commit bot

Make base::internal::CallbackBase::is_null inline.

This saves 11 bytes per call site on x64-clang and 12 byte per call site on
ARM-gcc.

BUG=410776
TEST=base_unittests

Review URL: https://codereview.chromium.org/540883002

Cr-Commit-Position: refs/heads/master@{#295215}
parent 0215564c
......@@ -9,10 +9,6 @@
namespace base {
namespace internal {
bool CallbackBase::is_null() const {
return bind_state_.get() == NULL;
}
void CallbackBase::Reset() {
polymorphic_invoke_ = NULL;
// NULL the bind_state_ last, since it may be holding the last ref to whatever
......
......@@ -37,7 +37,7 @@ class BindStateBase : public RefCountedThreadSafe<BindStateBase> {
class BASE_EXPORT CallbackBase {
public:
// Returns true if Callback is null (doesn't refer to anything).
bool is_null() const;
bool is_null() const { return bind_state_.get() == NULL; }
// Returns the Callback into an uninitialized state.
void Reset();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment