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

Unified Diff: gin/function_template.h.pump

Issue 105423003: gin::Wrappable shouldn't inherit from base::RefCounted (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: gin/function_template.h.pump
diff --git a/gin/function_template.h.pump b/gin/function_template.h.pump
index 6b6ffc57e4ac57db98c530affd689f3cef07d36e..2927735d9821cfcc66e0cb966951173845083f31 100644
--- a/gin/function_template.h.pump
+++ b/gin/function_template.h.pump
@@ -18,6 +18,7 @@ $var MAX_ARITY = 4
#include "base/logging.h"
#include "gin/arguments.h"
#include "gin/converter.h"
+#include "gin/handle.h"
#include "gin/public/gin_embedders.h"
#include "gin/public/wrapper_info.h"
#include "gin/wrappable.h"
@@ -174,11 +175,11 @@ v8::Local<v8::FunctionTemplate> CreateFunctionTemplate(
v8::Isolate* isolate,
const base::Callback<R($for ARG , [[P$(ARG)]])> callback) {
typedef internal::CallbackHolder<R($for ARG , [[P$(ARG)]])> HolderT;
- scoped_refptr<HolderT> holder(new HolderT(callback));
+ gin::Handle<HolderT> holder = CreateHandle(isolate, new HolderT(callback));
return v8::FunctionTemplate::New(
isolate,
&internal::DispatchToCallback<R$for ARG [[, P$(ARG)]]>,
- ConvertToV8<internal::CallbackHolderBase*>(isolate, holder.get()));
+ ConvertToV8<internal::CallbackHolderBase*>(isolate, holder.Get()));
}
]]

Powered by Google App Engine
This is Rietveld 408576698