| 2606 | |
| 2607 | template <typename T, template <typename> class HandleType> |
| 2608 | inline void SetMethod( |
| 2609 | HandleType<T> recv |
| 2610 | , const char *name |
| 2611 | , FunctionCallback callback |
| 2612 | , v8::Local<v8::Value> data = v8::Local<v8::Value>()) { |
| 2613 | HandleScope scope; |
| 2614 | v8::Local<v8::FunctionTemplate> t = New<v8::FunctionTemplate>(callback, data); |
| 2615 | v8::Local<v8::String> fn_name = New(name).ToLocalChecked(); |
| 2616 | t->SetClassName(fn_name); |
| 2617 | // Note(@agnat): Pass an empty T* as discriminator. See note on |
| 2618 | // SetMethodAux(...) above |
| 2619 | imp::SetMethodAux(recv, fn_name, t, static_cast<T*>(0)); |
| 2620 | } |
| 2621 | |
| 2622 | inline void SetPrototypeMethod( |
| 2623 | v8::Local<v8::FunctionTemplate> recv |
no test coverage detected