From 8d537ee2b6da29c1aa38928590d4c56700e1c69b Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Thu, 12 Feb 2015 12:55:50 +0800 Subject: [PATCH] Remove unneeded helper --- native_mate/callback.h | 7 ------- native_mate/callback.h.pump | 9 +-------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/native_mate/callback.h b/native_mate/callback.h index 886b53b2d1f8..d80d381fc36d 100644 --- a/native_mate/callback.h +++ b/native_mate/callback.h @@ -18,13 +18,6 @@ namespace internal { typedef scoped_refptr > SafeV8Function; -// Helper to convert type to V8 with storage type (const T& to T). -template -v8::Handle ConvertToV8(v8::Isolate* isolate, T a) { - return Converter::StorageType> - ::ToV8(isolate, a); -} - // This set of templates invokes a V8::Function by converting the C++ types. template struct V8FunctionInvoker; diff --git a/native_mate/callback.h.pump b/native_mate/callback.h.pump index 0203065ce0c5..9f0220ee6dea 100644 --- a/native_mate/callback.h.pump +++ b/native_mate/callback.h.pump @@ -21,13 +21,6 @@ namespace internal { typedef scoped_refptr > SafeV8Function; -// Helper to convert type to V8 with storage type (const T& to T). -template -v8::Handle ConvertToV8(v8::Isolate* isolate, T a) { - return Converter::StorageType> - ::ToV8(isolate, a); -} - // This set of templates invokes a V8::Function by converting the C++ types. template struct V8FunctionInvoker; @@ -102,7 +95,7 @@ struct Converter > { return false; internal::SafeV8Function function( - new RefCountedPersistent(val)); + new RefCountedPersistent(isolate, val)); *out = base::Bind(&internal::V8FunctionInvoker::Go, isolate, function); return true; }