From f883604e3ea3a0b9881dc5eb1e933fb66d914003 Mon Sep 17 00:00:00 2001 From: dcheng Date: Tue, 25 Nov 2014 21:04:55 -0800 Subject: [PATCH] Out of line CallbackBase's copy and assignment operators. This saved nearly 300KiB on a release build of Chrome. BUG=436357 Review URL: https://codereview.chromium.org/760513002 Cr-Commit-Position: refs/heads/master@{#305784} --- base/callback_internal.cc | 3 +++ base/callback_internal.h | 3 +++ build/get_landmines.py | 1 + 3 files changed, 7 insertions(+) diff --git a/base/callback_internal.cc b/base/callback_internal.cc index ed0fb0dd0cce..f360388273da 100644 --- a/base/callback_internal.cc +++ b/base/callback_internal.cc @@ -9,6 +9,9 @@ namespace base { namespace internal { +CallbackBase::CallbackBase(const CallbackBase& c) = default; +CallbackBase& CallbackBase::operator=(const CallbackBase& c) = default; + void CallbackBase::Reset() { polymorphic_invoke_ = NULL; // NULL the bind_state_ last, since it may be holding the last ref to whatever diff --git a/base/callback_internal.h b/base/callback_internal.h index 9dca02387dce..8a5c4378bc1c 100644 --- a/base/callback_internal.h +++ b/base/callback_internal.h @@ -36,6 +36,9 @@ class BindStateBase : public RefCountedThreadSafe { // template bloat. class BASE_EXPORT CallbackBase { public: + CallbackBase(const CallbackBase& c); + CallbackBase& operator=(const CallbackBase& c); + // Returns true if Callback is null (doesn't refer to anything). bool is_null() const { return bind_state_.get() == NULL; } diff --git a/build/get_landmines.py b/build/get_landmines.py index 2c3b3d7574a5..74d95616b3c6 100755 --- a/build/get_landmines.py +++ b/build/get_landmines.py @@ -62,6 +62,7 @@ def print_landmines(): print 'Delete stale generated .java files yet again. crbug.com/349592' print 'Clobber to delete incompatible object binary format with NDK r10c' print 'Clobber to fix missing NaCl gyp dependencies (crbug.com/427427).' + print 'Another clobber for missing NaCl gyp deps (crbug.com/427427).' def main(): -- 2.11.4.GIT