#include "node.h" #include "v8.h" #include "../../../src/util.h" using v8::Function; using v8::FunctionCallbackInfo; using v8::Isolate; using v8::Local; using v8::Object; using v8::Value; namespace { void MakeCallback(const FunctionCallbackInfo& args) { CHECK(args[0]->IsObject()); CHECK(args[1]->IsFunction()); Isolate* isolate = args.GetIsolate(); Local recv = args[0].As(); Local method = args[1].As(); node::MakeCallback(isolate, recv, method, 0, nullptr); } void Initialize(Local target) { NODE_SET_METHOD(target, "makeCallback", MakeCallback); } } // namespace anonymous NODE_MODULE(binding, Initialize)