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

Unified Diff: gin/function_template.h.pump

Issue 105743007: Gin: Make it easier to implement Wrappable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 7 years 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 | « gin/function_template.cc ('k') | gin/object_template_builder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gin/function_template.h.pump
diff --git a/gin/function_template.h.pump b/gin/function_template.h.pump
index 23941c08287209c8eb03c2d8d92d5e6c0a57d8b0..66c226318be903b93e78120936b1a53c88b74e77 100644
--- a/gin/function_template.h.pump
+++ b/gin/function_template.h.pump
@@ -58,12 +58,12 @@ struct CallbackParamTraits<const T*> {
// It inherits from Wrappable, which delete itself when both (a) the refcount
// via base::RefCounted has dropped to zero, and (b) there are no more
// JavaScript references in V8.
-class CallbackHolderBase : public Wrappable {
- public:
- virtual WrapperInfo* GetWrapperInfo() OVERRIDE;
- static WrapperInfo kWrapperInfo;
+
+// This simple base class is used so that we can share a single object template
+// among every CallbackHolder instance.
+class CallbackHolderBase : public Wrappable<CallbackHolderBase> {
protected:
- virtual ~CallbackHolderBase() {}
+ ~CallbackHolderBase() {}
};
template<typename Sig>
@@ -74,7 +74,7 @@ class CallbackHolder : public CallbackHolderBase {
base::Callback<Sig> callback;
int flags;
private:
- virtual ~CallbackHolder() {}
+ ~CallbackHolder() {}
};
« no previous file with comments | « gin/function_template.cc ('k') | gin/object_template_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698