Remove unneeded helper
This commit is contained in:
parent
3387f33a8e
commit
8d537ee2b6
2 changed files with 1 additions and 15 deletions
|
@ -18,13 +18,6 @@ namespace internal {
|
||||||
|
|
||||||
typedef scoped_refptr<RefCountedPersistent<v8::Function> > SafeV8Function;
|
typedef scoped_refptr<RefCountedPersistent<v8::Function> > SafeV8Function;
|
||||||
|
|
||||||
// Helper to convert type to V8 with storage type (const T& to T).
|
|
||||||
template<typename T>
|
|
||||||
v8::Handle<v8::Value> ConvertToV8(v8::Isolate* isolate, T a) {
|
|
||||||
return Converter<typename base::internal::CallbackParamTraits<T>::StorageType>
|
|
||||||
::ToV8(isolate, a);
|
|
||||||
}
|
|
||||||
|
|
||||||
// This set of templates invokes a V8::Function by converting the C++ types.
|
// This set of templates invokes a V8::Function by converting the C++ types.
|
||||||
template<typename Sig>
|
template<typename Sig>
|
||||||
struct V8FunctionInvoker;
|
struct V8FunctionInvoker;
|
||||||
|
|
|
@ -21,13 +21,6 @@ namespace internal {
|
||||||
|
|
||||||
typedef scoped_refptr<RefCountedPersistent<v8::Function> > SafeV8Function;
|
typedef scoped_refptr<RefCountedPersistent<v8::Function> > SafeV8Function;
|
||||||
|
|
||||||
// Helper to convert type to V8 with storage type (const T& to T).
|
|
||||||
template<typename T>
|
|
||||||
v8::Handle<v8::Value> ConvertToV8(v8::Isolate* isolate, T a) {
|
|
||||||
return Converter<typename base::internal::CallbackParamTraits<T>::StorageType>
|
|
||||||
::ToV8(isolate, a);
|
|
||||||
}
|
|
||||||
|
|
||||||
// This set of templates invokes a V8::Function by converting the C++ types.
|
// This set of templates invokes a V8::Function by converting the C++ types.
|
||||||
template<typename Sig>
|
template<typename Sig>
|
||||||
struct V8FunctionInvoker;
|
struct V8FunctionInvoker;
|
||||||
|
@ -102,7 +95,7 @@ struct Converter<base::Callback<Sig> > {
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
internal::SafeV8Function function(
|
internal::SafeV8Function function(
|
||||||
new RefCountedPersistent<v8::Function>(val));
|
new RefCountedPersistent<v8::Function>(isolate, val));
|
||||||
*out = base::Bind(&internal::V8FunctionInvoker<Sig>::Go, isolate, function);
|
*out = base::Bind(&internal::V8FunctionInvoker<Sig>::Go, isolate, function);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue