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

Unified Diff: base/callback.h

Issue 1129353003: Devirtualize base::BindState to save ~1% of Chrome's binary size (~1MB) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20150507-SizesExplorations
Patch Set: This old trap Created 5 years, 7 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
Index: base/callback.h
diff --git a/base/callback.h b/base/callback.h
index 00669dd83d1c2dbb518134f0243fd5dbec104133..5be4c34800c76918f354dae934c0634a5b3cbf32 100644
--- a/base/callback.h
+++ b/base/callback.h
@@ -367,7 +367,7 @@ class Callback<R(Args...)> : public internal::CallbackBase {
public:
typedef R(RunType)(Args...);
- Callback() : CallbackBase(NULL) { }
+ Callback() {}
// Note that this constructor CANNOT be explicit, and that Bind() CANNOT
// return the exact Callback<> type. See base/bind.h for details.
@@ -393,7 +393,7 @@ class Callback<R(Args...)> : public internal::CallbackBase {
PolymorphicInvoke f =
reinterpret_cast<PolymorphicInvoke>(polymorphic_invoke_);
- return f(bind_state_.get(), internal::CallbackForward(args)...);
+ return f(bind_state_, internal::CallbackForward(args)...);
}
private:
« no previous file with comments | « base/bind_internal.h ('k') | base/callback_internal.h » ('j') | base/callback_internal.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698